blob: 06b7f67039e9c63747c3f01cd07bf942849ef37f [file] [log] [blame]
// Copyright 2022 The Dawn & Tint Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
////////////////////////////////////////////////////////////////////////////////
// File generated by 'tools/src/cmd/gen' using the template:
// src/tint/lang/wgsl/extension_bench.cc.tmpl
//
// To regenerate run: './tools/run gen'
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
#include "src/tint/lang/wgsl/extension.h"
#include <array>
#include "benchmark/benchmark.h"
namespace tint::wgsl {
namespace {
void ExtensionParser(::benchmark::State& state) {
const char* kStrings[] = {
"chromium_disableuniformiccy_analysis",
"chromil3_disable_unifority_analss",
"chromium_disable_Vniformity_analysis",
"chromium_disable_uniformity_analysis",
"chromium_dis1ble_uniformity_analysis",
"chromium_qqisable_unifomity_anaJysis",
"chrollium_disable_uniformity_analysi77",
"chromippHm_experqqmetal_dp4a",
"chrmium_expecimntal_dp4",
"chrmiumGexpebimental_dp4a",
"chromium_experimental_dp4a",
"chromium_exverimentiil_dp4a",
"chro8ium_experimenWWal_dp4a",
"chromiMm_eperimxxntal_dp4a",
"cXromium_expermental_framggbuffer_fetch",
"chVomiu_experimntal_fXauebuffer_fetch",
"chromium_experimental_fr3mebuffer_fetch",
"chromium_experimental_framebuffer_fetch",
"chromium_experimental_fraEebuffer_fetch",
"chromTTum_experimental_fraebuffePP_fetch",
"chromum_experiddental_framebxxffer_fetch",
"chromium_experimental_full_ptr_p44rameters",
"SShromium_experimental_full_ptr_parameVVers",
"chroRium_expRrimental_fu22l_ptr_prameters",
"chromium_experimental_full_ptr_parameters",
"chromium_experimFntal_full_ptr_paramet9r",
"chromium_experimentl_full_ptr_parameters",
"chromiuHexperimental_fulOO_pVr_paramRRters",
"chromium_experimenya_pixel_local",
"chrromium_exp77rimentnnl_pixellllocGl",
"chromium_exper4mental_pixel_lo00al",
"chromium_experimental_pixel_local",
"chooomium_eperimenal_pxel_local",
"chromium_experzzental_pixel_ocal",
"chiiomiu_epperimental_pix11l_local",
"chromXXum_experimental_push_constant",
"chromII9um_experinnental_push_c55nstant",
"chSSomium_experiHHental_pusrraaconstaYt",
"chromium_experimental_push_constant",
"chromium_epHrimentkk_psh_constant",
"chromium_expegimenja_puRRh_costant",
"chromium_bxperimental_push_contan",
"chromium_experimental_read_wjite_storage_texture",
"chromium_expeimental_read_write_storage_texture",
"chqomium_experimentl_rad_write_storage_texture",
"chromium_experimental_read_write_storage_texture",
"chromium_experimental_read_writNN_storage_texure",
"chromiumexperimental_read_write_stovvage_texure",
"chromium_xperimental_read_write_storage_textQQre",
"cffromium_experimenralsubgrous",
"chromium_experimentjl_subgroups",
"chromiu2ww8NNperimental_subgoups",
"chromium_experimental_subgroups",
"chromium_experimental_subgroup",
"chromiurr_experimental_subgroups",
"cGromium_experimental_subgroups",
"chromium_internFFl_dual_source_blending",
"cEromum_internl_dual_source_bleding",
"chromium_internal_dual_source_brrendin",
"chromium_internal_dual_source_blending",
"chromium_internal_dual_surce_blendin",
"chromium_iXterJJa_dual_souDce_blending",
"chromi8m_ineral_dual_source_blendin",
"chromu11_internal_relaed_uniform_kayou",
"chromium_internal_relaxd_uniform_layout",
"chromium_internal_elaxed_uJiform_layout",
"chromium_internal_relaxed_uniform_layout",
"chromium_intcrnal_relaxed_uniform_layout",
"chromiOm_internal_relaxed_uniform_layout",
"chromiutt_intervva_KK_relaxed_uniform_layout",
"xx8",
"__F",
"f1q",
"f16",
"331O",
"ftt6QQ",
"666",
};
for (auto _ : state) {
for (auto* str : kStrings) {
auto result = ParseExtension(str);
benchmark::DoNotOptimize(result);
}
}
} // NOLINT(readability/fn_size)
BENCHMARK(ExtensionParser);
} // namespace
} // namespace tint::wgsl