llvm/llvm/include/llvm/BinaryFormat/DXContainer.h

//===-- llvm/BinaryFormat/DXContainer.h - The DXBC file format --*- 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
//
//===----------------------------------------------------------------------===//
//
// This file defines manifest constants for the DXContainer object file format.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_BINARYFORMAT_DXCONTAINER_H
#define LLVM_BINARYFORMAT_DXCONTAINER_H

#include "llvm/ADT/StringRef.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/TargetParser/Triple.h"

#include <stdint.h>

namespace llvm {
template <typename T> struct EnumEntry;

// The DXContainer file format is arranged as a header and "parts". Semantically
// parts are similar to sections in other object file formats. The File format
// structure is roughly:

// ┌────────────────────────────────┐
// │             Header             │
// ├────────────────────────────────┤
// │              Part              │
// ├────────────────────────────────┤
// │              Part              │
// ├────────────────────────────────┤
// │              ...               │
// └────────────────────────────────┘

namespace dxbc {

inline Triple::EnvironmentType getShaderStage(uint32_t Kind) {}

struct Hash {};

enum class HashFlags : uint32_t {};

struct ShaderHash {};

struct ContainerVersion {};

struct Header {};

/// Use this type to describe the size and type of a DXIL container part.
struct PartHeader {};

struct BitcodeHeader {};

struct ProgramHeader {};

static_assert;

#define CONTAINER_PART
enum class PartType {};

#define SHADER_FEATURE_FLAG
enum class FeatureFlags : uint64_t {};
static_assert;

PartType parsePartType(StringRef S);

struct VertexPSVInfo {};

struct HullPSVInfo {};

struct DomainPSVInfo {};

struct GeometryPSVInfo {};

struct PixelPSVInfo {};

struct MeshPSVInfo {};

struct AmplificationPSVInfo {};

PipelinePSVInfo;

static_assert;

namespace PSV {

#define SEMANTIC_KIND
enum class SemanticKind : uint8_t {};

ArrayRef<EnumEntry<SemanticKind>> getSemanticKinds();

#define COMPONENT_TYPE
enum class ComponentType : uint8_t {};

ArrayRef<EnumEntry<ComponentType>> getComponentTypes();

#define INTERPOLATION_MODE
enum class InterpolationMode : uint8_t {};

ArrayRef<EnumEntry<InterpolationMode>> getInterpolationModes();

#define RESOURCE_TYPE
enum class ResourceType : uint32_t {};

ArrayRef<EnumEntry<ResourceType>> getResourceTypes();

#define RESOURCE_KIND
enum class ResourceKind : uint32_t {};

ArrayRef<EnumEntry<ResourceKind>> getResourceKinds();

#define RESOURCE_FLAG
struct ResourceFlags {};

namespace v0 {
struct RuntimeInfo {};

struct ResourceBindInfo {};

struct SignatureElement {};

static_assert;

} // namespace v0

namespace v1 {

struct MeshRuntimeInfo {};

GeometryExtraInfo;
struct RuntimeInfo : public v0::RuntimeInfo {};

} // namespace v1

namespace v2 {
struct RuntimeInfo : public v1::RuntimeInfo {};

struct ResourceBindInfo : public v0::ResourceBindInfo {};

} // namespace v2

namespace v3 {
struct RuntimeInfo : public v2::RuntimeInfo {};

} // namespace v3
} // namespace PSV

#define COMPONENT_PRECISION
enum class SigMinPrecision : uint32_t {};

ArrayRef<EnumEntry<SigMinPrecision>> getSigMinPrecisions();

#define D3D_SYSTEM_VALUE
enum class D3DSystemValue : uint32_t {};

ArrayRef<EnumEntry<D3DSystemValue>> getD3DSystemValues();

#define COMPONENT_TYPE
enum class SigComponentType : uint32_t {};

ArrayRef<EnumEntry<SigComponentType>> getSigComponentTypes();

struct ProgramSignatureHeader {};

struct ProgramSignatureElement {};

static_assert;

} // namespace dxbc
} // namespace llvm

#endif // LLVM_BINARYFORMAT_DXCONTAINER_H