LLVM 20.0.0git
DXILABI.h
Go to the documentation of this file.
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 <cstdint>
21
22namespace llvm {
23namespace dxil {
24
25enum class ResourceClass : uint8_t {
26 SRV = 0,
27 UAV,
28 CBuffer,
29 Sampler,
30};
31
32/// The kind of resource for an SRV or UAV resource. Sometimes referred to as
33/// "Shape" in the DXIL docs.
34enum class ResourceKind : uint32_t {
35 Invalid = 0,
48 CBuffer,
49 Sampler,
50 TBuffer,
55};
56
57/// The element type of an SRV or UAV resource.
58enum class ElementType : uint32_t {
59 Invalid = 0,
60 I1,
61 I16,
62 U16,
63 I32,
64 U32,
65 I64,
66 U64,
67 F16,
68 F32,
69 F64,
78};
79
80/// Metadata tags for extra resource properties.
81enum class ExtPropTags : uint32_t {
82 ElementType = 0,
85 Atomic64Use = 3,
86};
87
88enum class SamplerType : uint32_t {
89 Default = 0,
90 Comparison = 1,
91 Mono = 2, // Note: Seems to be unused.
92};
93
95 MinMip = 0,
96 MipRegionUsed = 1,
97};
98
99} // namespace dxil
100} // namespace llvm
101
102#endif // LLVM_SUPPORT_DXILABI_H
ResourceKind
The kind of resource for an SRV or UAV resource.
Definition: DXILABI.h:34
ResourceClass
Definition: DXILABI.h:25
ExtPropTags
Metadata tags for extra resource properties.
Definition: DXILABI.h:81
SamplerFeedbackType
Definition: DXILABI.h:94
ElementType
The element type of an SRV or UAV resource.
Definition: DXILABI.h:58
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18