llvm/llvm/include/llvm/ObjectYAML/DXContainerYAML.h

//===- DXContainerYAML.h - DXContainer YAMLIO implementation ----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file declares classes for handling the YAML representation
/// of DXContainer.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_OBJECTYAML_DXCONTAINERYAML_H
#define LLVM_OBJECTYAML_DXCONTAINERYAML_H

#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/DXContainer.h"
#include "llvm/ObjectYAML/YAML.h"
#include "llvm/Support/YAMLTraits.h"
#include <array>
#include <cstdint>
#include <optional>
#include <string>
#include <vector>

namespace llvm {
namespace DXContainerYAML {

struct VersionTuple {};

// The optional header fields are required in the binary and will be populated
// when reading from binary, but can be omitted in the YAML text because the
// emitter can calculate them.
struct FileHeader {};

struct DXILProgram {};

#define SHADER_FEATURE_FLAG
struct ShaderFeatureFlags {};

struct ShaderHash {};

ResourceFlags;
ResourceBindInfo;

struct SignatureElement {};

struct PSVInfo {};

struct SignatureParameter {};

struct Signature {};

struct Part {};

struct Object {};

} // namespace DXContainerYAML
} // namespace llvm

LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DXContainerYAML::Part)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DXContainerYAML::ResourceBindInfo)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DXContainerYAML::SignatureElement)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DXContainerYAML::PSVInfo::MaskVector)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DXContainerYAML::SignatureParameter)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::SemanticKind)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::ComponentType)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::InterpolationMode)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::ResourceType)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::ResourceKind)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::D3DSystemValue)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::SigComponentType)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::SigMinPrecision)

namespace llvm {

class raw_ostream;

namespace yaml {

template <> struct MappingTraits<DXContainerYAML::VersionTuple> {};

template <> struct MappingTraits<DXContainerYAML::FileHeader> {};

template <> struct MappingTraits<DXContainerYAML::DXILProgram> {};

template <> struct MappingTraits<DXContainerYAML::ShaderFeatureFlags> {};

template <> struct MappingTraits<DXContainerYAML::ShaderHash> {};

template <> struct MappingTraits<DXContainerYAML::PSVInfo> {};

template <> struct MappingTraits<DXContainerYAML::Part> {};

template <> struct MappingTraits<DXContainerYAML::Object> {};

template <> struct MappingTraits<DXContainerYAML::ResourceFlags> {};

template <> struct MappingTraits<DXContainerYAML::ResourceBindInfo> {};

template <> struct MappingTraits<DXContainerYAML::SignatureElement> {};

template <> struct MappingTraits<DXContainerYAML::SignatureParameter> {};

template <> struct MappingTraits<DXContainerYAML::Signature> {};

} // namespace yaml

} // namespace llvm

#endif // LLVM_OBJECTYAML_DXCONTAINERYAML_H