1//===-- DXILABI.h - ABI Sensitive Values for DXIL ---------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains definitions of various constants and enums that are
10// required to remain stable as per the DXIL format's requirements.
11//
12// Documentation for DXIL can be found in
13// https://github.com/Microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst.
14//
15//===----------------------------------------------------------------------===//
16
17#ifndef LLVM_SUPPORT_DXILABI_H
18#define LLVM_SUPPORT_DXILABI_H
19
20#include "llvm/ADT/StringSwitch.h"
21
22namespace llvm {
23namespace dxil {
24
25enum class ParameterKind : uint8_t {
26 Invalid = 0,
27 Void,
28 Half,
29 Float,
30 Double,
31 I1,
32 I8,
33 I16,
34 I32,
35 I64,
36 Overload,
37 CBufferRet,
38 ResourceRet,
39 DXILHandle,
40};
41
42/// The kind of resource for an SRV or UAV resource. Sometimes referred to as
43/// "Shape" in the DXIL docs.
44enum class ResourceKind : uint32_t {
45 Invalid = 0,
46 Texture1D,
47 Texture2D,
48 Texture2DMS,
49 Texture3D,
50 TextureCube,
51 Texture1DArray,
52 Texture2DArray,
53 Texture2DMSArray,
54 TextureCubeArray,
55 TypedBuffer,
56 RawBuffer,
57 StructuredBuffer,
58 CBuffer,
59 Sampler,
60 TBuffer,
61 RTAccelerationStructure,
62 FeedbackTexture2D,
63 FeedbackTexture2DArray,
64 NumEntries,
65};
66
67/// The element type of an SRV or UAV resource.
68enum class ElementType : uint32_t {
69 Invalid = 0,
70 I1,
71 I16,
72 U16,
73 I32,
74 U32,
75 I64,
76 U64,
77 F16,
78 F32,
79 F64,
80 SNormF16,
81 UNormF16,
82 SNormF32,
83 UNormF32,
84 SNormF64,
85 UNormF64,
86 PackedS8x32,
87 PackedU8x32,
88};
89
90} // namespace dxil
91} // namespace llvm
92
93#endif // LLVM_SUPPORT_DXILABI_H
94

source code of llvm/include/llvm/Support/DXILABI.h