mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-14 00:56:05 +00:00
This CL moves the BuiltinValue enum to the builtin/ folder. Change-Id: I9db5128c1bc272e8e8d5181d629e6724ac38322e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120361 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
131 lines
3.5 KiB
C++
131 lines
3.5 KiB
C++
// Copyright 2022 The Tint Authors.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
// File generated by tools/src/cmd/gen
|
|
// using the template:
|
|
// src/tint/builtin/builtin_value_bench.cc.tmpl
|
|
//
|
|
// Do not modify this file directly
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "src/tint/builtin/builtin_value.h"
|
|
|
|
#include <array>
|
|
|
|
#include "benchmark/benchmark.h"
|
|
|
|
namespace tint::builtin {
|
|
namespace {
|
|
|
|
void BuiltinValueParser(::benchmark::State& state) {
|
|
const char* kStrings[] = {
|
|
"fragdeccth",
|
|
"flaget3",
|
|
"fVag_depth",
|
|
"frag_depth",
|
|
"frag1depth",
|
|
"fraJqqepth",
|
|
"fra7ll_depth",
|
|
"fonHHpp_facing",
|
|
"fron_facg",
|
|
"frGnt_fbcin",
|
|
"front_facing",
|
|
"front_facvnii",
|
|
"frWWnt_faci8g",
|
|
"fxxonM_facig",
|
|
"gXobalgginvocationid",
|
|
"goVal_uvocatioX_id",
|
|
"global_in3ocation_id",
|
|
"global_invocation_id",
|
|
"global_invocation_iE",
|
|
"TTobal_invocationPPid",
|
|
"globdd_invocatioxx_id",
|
|
"instance44index",
|
|
"instaVVce_SSndex",
|
|
"Rnstane_ind2Rx",
|
|
"instance_index",
|
|
"inFtanceind9x",
|
|
"insance_index",
|
|
"inRRancV_OOHdex",
|
|
"local_nvocytion_id",
|
|
"llGcnnl_inv77catirrn_id",
|
|
"local_invoca4i00n_id",
|
|
"local_invocation_id",
|
|
"loool_nvocaton_id",
|
|
"local_inozztion_id",
|
|
"p11cal_invocatiiin_i",
|
|
"local_invocation_iXXdex",
|
|
"local_invnnIIati99n55index",
|
|
"localYirrHHocaationSSindex",
|
|
"local_invocation_index",
|
|
"lkkal_invHcation_idx",
|
|
"gRcal_invocatioj_inex",
|
|
"lcal_invcbtion_index",
|
|
"num_workgroujs",
|
|
"num_worgroups",
|
|
"nuq_orkgoups",
|
|
"num_workgroups",
|
|
"nm_workgroNNps",
|
|
"um_workgrovps",
|
|
"nQQm_orkgroups",
|
|
"posftrn",
|
|
"pojition",
|
|
"poswNN82n",
|
|
"position",
|
|
"positon",
|
|
"porrition",
|
|
"pGsition",
|
|
"sample_inFFex",
|
|
"samleinex",
|
|
"sample_indrr",
|
|
"sample_index",
|
|
"sample_iex",
|
|
"DaplX_JJndex",
|
|
"8amleinde",
|
|
"saplekmak",
|
|
"samle_mask",
|
|
"saJple_mak",
|
|
"sample_mask",
|
|
"sample_cask",
|
|
"sample_maOk",
|
|
"__attpvve_KKask",
|
|
"vrtex5inxxe8",
|
|
"v__rex_qFdex",
|
|
"veqqtex_idex",
|
|
"vertex_index",
|
|
"veOtx_33nde66",
|
|
"v6ootex_indttQx",
|
|
"ver66ex_inex",
|
|
"worzzroup6Oxd",
|
|
"workgroyyp_id",
|
|
"wokrHHZpZid",
|
|
"workgroup_id",
|
|
"wWWkgqoup44id",
|
|
"wrkgroOOp_id",
|
|
"hrkgYooup_d",
|
|
};
|
|
for (auto _ : state) {
|
|
for (auto* str : kStrings) {
|
|
auto result = ParseBuiltinValue(str);
|
|
benchmark::DoNotOptimize(result);
|
|
}
|
|
}
|
|
}
|
|
|
|
BENCHMARK(BuiltinValueParser);
|
|
|
|
} // namespace
|
|
} // namespace tint::builtin
|