// 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.h.tmpl
//
// To regenerate run: './tools/run gen'
//
//                       Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////

#ifndef SRC_TINT_LANG_WGSL_EXTENSION_H_
#define SRC_TINT_LANG_WGSL_EXTENSION_H_

#include "src/tint/utils/containers/unique_vector.h"
#include "src/tint/utils/rtti/traits.h"

namespace tint::wgsl {

/// An enumerator of WGSL extensions
/// @see src/tint/lang/wgsl/intrinsics.def for extension descriptions
enum class Extension : uint8_t {
    kUndefined,
    kChromiumDisableUniformityAnalysis,
    kChromiumExperimentalFramebufferFetch,
    kChromiumExperimentalPixelLocal,
    kChromiumExperimentalPushConstant,
    kChromiumExperimentalSubgroupMatrix,
    kChromiumInternalGraphite,
    kChromiumInternalInputAttachments,
    kChromiumInternalRelaxedUniformLayout,
    kClipDistances,
    kDualSourceBlending,
    kF16,
    kSubgroups,
    kSubgroupsF16,
};

/// @param value the enum value
/// @returns the string for the given enum value
std::string_view ToString(Extension value);

/// @param out the stream to write to
/// @param value the Extension
/// @returns @p out so calls can be chained
template <typename STREAM, typename = traits::EnableIfIsOStream<STREAM>>
auto& operator<<(STREAM& out, Extension value) {
    return out << ToString(value);
}

/// ParseExtension parses a Extension from a string.
/// @param str the string to parse
/// @returns the parsed enum, or Extension::kUndefined if the string could not be parsed.
Extension ParseExtension(std::string_view str);

constexpr std::string_view kExtensionStrings[] = {
    "chromium_disable_uniformity_analysis",
    "chromium_experimental_framebuffer_fetch",
    "chromium_experimental_pixel_local",
    "chromium_experimental_push_constant",
    "chromium_experimental_subgroup_matrix",
    "chromium_internal_graphite",
    "chromium_internal_input_attachments",
    "chromium_internal_relaxed_uniform_layout",
    "clip_distances",
    "dual_source_blending",
    "f16",
    "subgroups",
    "subgroups_f16",
};

/// All extensions
static constexpr Extension kAllExtensions[] = {
    Extension::kChromiumDisableUniformityAnalysis,
    Extension::kChromiumExperimentalFramebufferFetch,
    Extension::kChromiumExperimentalPixelLocal,
    Extension::kChromiumExperimentalPushConstant,
    Extension::kChromiumExperimentalSubgroupMatrix,
    Extension::kChromiumInternalGraphite,
    Extension::kChromiumInternalInputAttachments,
    Extension::kChromiumInternalRelaxedUniformLayout,
    Extension::kClipDistances,
    Extension::kDualSourceBlending,
    Extension::kF16,
    Extension::kSubgroups,
    Extension::kSubgroupsF16,
};

/// A unique vector of extensions
using Extensions = UniqueVector<Extension, 4>;

}  // namespace tint::wgsl

#endif  // SRC_TINT_LANG_WGSL_EXTENSION_H_
