// Copyright 2023 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/spirv/intrinsic/data.cc.tmpl // // To regenerate run: './tools/run gen' // // Do not modify this file directly //////////////////////////////////////////////////////////////////////////////// #include <limits> #include <string> #include "src/tint/lang/core/intrinsic/type_matchers.h" #include "src/tint/lang/spirv/intrinsic/dialect.h" #include "src/tint/lang/spirv/intrinsic/type_matchers.h" #include "src/tint/utils/text/string_stream.h" namespace tint::spirv::intrinsic { usingnamespacetint::core::intrinsic; // NOLINT(build/namespaces) namespace { ConstEvalFunctionIndex; IntrinsicInfo; MatcherIndicesIndex; MatchState; Number; NumberMatcher; NumberMatcherIndex; OverloadFlag; OverloadFlags; OverloadIndex; OverloadInfo; ParameterIndex; ParameterInfo; StringStream; TemplateIndex; Type; TypeMatcher; TypeMatcherIndex; TemplateNumberMatcher; TemplateTypeMatcher; // clang-format off /// TypeMatcher for 'type bool' constexpr TypeMatcher kBoolMatcher { … }; /// TypeMatcher for 'type f32' constexpr TypeMatcher kF32Matcher { … }; /// TypeMatcher for 'type f16' constexpr TypeMatcher kF16Matcher { … }; /// TypeMatcher for 'type i32' constexpr TypeMatcher kI32Matcher { … }; /// TypeMatcher for 'type u32' constexpr TypeMatcher kU32Matcher { … }; /// TypeMatcher for 'type vec2' constexpr TypeMatcher kVec2Matcher { … }; /// TypeMatcher for 'type vec3' constexpr TypeMatcher kVec3Matcher { … }; /// TypeMatcher for 'type vec4' constexpr TypeMatcher kVec4Matcher { … }; /// TypeMatcher for 'type mat2x2' constexpr TypeMatcher kMat2X2Matcher { … }; /// TypeMatcher for 'type mat2x3' constexpr TypeMatcher kMat2X3Matcher { … }; /// TypeMatcher for 'type mat2x4' constexpr TypeMatcher kMat2X4Matcher { … }; /// TypeMatcher for 'type mat3x2' constexpr TypeMatcher kMat3X2Matcher { … }; /// TypeMatcher for 'type mat3x3' constexpr TypeMatcher kMat3X3Matcher { … }; /// TypeMatcher for 'type mat3x4' constexpr TypeMatcher kMat3X4Matcher { … }; /// TypeMatcher for 'type mat4x2' constexpr TypeMatcher kMat4X2Matcher { … }; /// TypeMatcher for 'type mat4x3' constexpr TypeMatcher kMat4X3Matcher { … }; /// TypeMatcher for 'type mat4x4' constexpr TypeMatcher kMat4X4Matcher { … }; /// TypeMatcher for 'type vec' constexpr TypeMatcher kVecMatcher { … }; /// TypeMatcher for 'type mat' constexpr TypeMatcher kMatMatcher { … }; /// TypeMatcher for 'type atomic' constexpr TypeMatcher kAtomicMatcher { … }; /// TypeMatcher for 'type sampler' constexpr TypeMatcher kSamplerMatcher { … }; /// TypeMatcher for 'type sampler_comparison' constexpr TypeMatcher kSamplerComparisonMatcher { … }; /// TypeMatcher for 'type texture_1d' constexpr TypeMatcher kTexture1DMatcher { … }; /// TypeMatcher for 'type texture_2d' constexpr TypeMatcher kTexture2DMatcher { … }; /// TypeMatcher for 'type texture_2d_array' constexpr TypeMatcher kTexture2DArrayMatcher { … }; /// TypeMatcher for 'type texture_3d' constexpr TypeMatcher kTexture3DMatcher { … }; /// TypeMatcher for 'type texture_cube' constexpr TypeMatcher kTextureCubeMatcher { … }; /// TypeMatcher for 'type texture_cube_array' constexpr TypeMatcher kTextureCubeArrayMatcher { … }; /// TypeMatcher for 'type texture_multisampled_2d' constexpr TypeMatcher kTextureMultisampled2DMatcher { … }; /// TypeMatcher for 'type texture_depth_2d' constexpr TypeMatcher kTextureDepth2DMatcher { … }; /// TypeMatcher for 'type texture_depth_2d_array' constexpr TypeMatcher kTextureDepth2DArrayMatcher { … }; /// TypeMatcher for 'type texture_depth_cube' constexpr TypeMatcher kTextureDepthCubeMatcher { … }; /// TypeMatcher for 'type texture_depth_cube_array' constexpr TypeMatcher kTextureDepthCubeArrayMatcher { … }; /// TypeMatcher for 'type texture_depth_multisampled_2d' constexpr TypeMatcher kTextureDepthMultisampled2DMatcher { … }; /// TypeMatcher for 'type texture_storage_1d' constexpr TypeMatcher kTextureStorage1DMatcher { … }; /// TypeMatcher for 'type texture_storage_2d' constexpr TypeMatcher kTextureStorage2DMatcher { … }; /// TypeMatcher for 'type texture_storage_2d_array' constexpr TypeMatcher kTextureStorage2DArrayMatcher { … }; /// TypeMatcher for 'type texture_storage_3d' constexpr TypeMatcher kTextureStorage3DMatcher { … }; /// TypeMatcher for 'type ptr' constexpr TypeMatcher kPtrMatcher { … }; /// TypeMatcher for 'type input_attachment' constexpr TypeMatcher kInputAttachmentMatcher { … }; /// TypeMatcher for 'type struct_with_runtime_array' constexpr TypeMatcher kStructWithRuntimeArrayMatcher { … }; /// TypeMatcher for 'type sampled_image' constexpr TypeMatcher kSampledImageMatcher { … }; /// TypeMatcher for 'match f32_f16' constexpr TypeMatcher kF32F16Matcher { … }; /// TypeMatcher for 'match iu32' constexpr TypeMatcher kIu32Matcher { … }; /// TypeMatcher for 'match fiu32' constexpr TypeMatcher kFiu32Matcher { … }; /// TypeMatcher for 'match scalar' constexpr TypeMatcher kScalarMatcher { … }; /// TypeMatcher for 'match samplers' constexpr TypeMatcher kSamplersMatcher { … }; /// EnumMatcher for 'match read_write' constexpr NumberMatcher kReadWriteMatcher { … }; /// EnumMatcher for 'match storage' constexpr NumberMatcher kStorageMatcher { … }; /// EnumMatcher for 'match workgroup_or_storage' constexpr NumberMatcher kWorkgroupOrStorageMatcher { … }; /// EnumMatcher for 'match f32_texel_format' constexpr NumberMatcher kF32TexelFormatMatcher { … }; /// EnumMatcher for 'match i32_texel_format' constexpr NumberMatcher kI32TexelFormatMatcher { … }; /// EnumMatcher for 'match u32_texel_format' constexpr NumberMatcher kU32TexelFormatMatcher { … }; /// EnumMatcher for 'match readable' constexpr NumberMatcher kReadableMatcher { … }; /// EnumMatcher for 'match writable' constexpr NumberMatcher kWritableMatcher { … }; /// Type and number matchers /// The template types, types, and type matchers constexpr TypeMatcher kTypeMatchers[] = …; /// The template numbers, and number matchers constexpr NumberMatcher kNumberMatchers[] = …; constexpr MatcherIndex kMatcherIndices[] = …; static_assert …; constexpr ParameterInfo kParameters[] = …; static_assert …; constexpr TemplateInfo kTemplates[] = …; static_assert …; constexpr OverloadInfo kOverloads[] = …; static_assert …; constexpr IntrinsicInfo kBuiltins[] = …; // clang-format on } // anonymous namespace const core::intrinsic::TableData Dialect::kData{ … }; } // namespace tint::spirv::intrinsic