LLVM 22.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 "llvm/ADT/StringRef.h"
21#include <cstdint>
22
23namespace llvm {
24namespace dxil {
25
26enum class ResourceClass : uint8_t {
27 SRV = 0,
28 UAV,
29 CBuffer,
30 Sampler,
31};
32
33/// The kind of resource for an SRV or UAV resource. Sometimes referred to as
34/// "Shape" in the DXIL docs.
35enum class ResourceKind : uint32_t {
36 Invalid = 0,
49 CBuffer,
50 Sampler,
51 TBuffer,
56};
57
58/// The element type of an SRV or UAV resource.
59enum class ElementType : uint32_t {
60 Invalid = 0,
61 I1,
62 I16,
63 U16,
64 I32,
65 U32,
66 I64,
67 U64,
68 F16,
69 F32,
70 F64,
79};
80
81/// Metadata tags for extra resource properties.
82enum class ExtPropTags : uint32_t {
83 ElementType = 0,
86 Atomic64Use = 3,
87};
88
89enum class SamplerType : uint32_t {
90 Default = 0,
91 Comparison = 1,
92 Mono = 2, // Note: Seems to be unused.
93};
94
96 MinMip = 0,
97 MipRegionUsed = 1,
98};
99
100const unsigned MinWaveSize = 4;
101const unsigned MaxWaveSize = 128;
102
104
105} // namespace dxil
106} // namespace llvm
107
108#endif // LLVM_SUPPORT_DXILABI_H
#define LLVM_ABI
Definition: Compiler.h:213
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
LLVM_ABI StringRef getResourceClassName(ResourceClass RC)
Definition: DXILABI.cpp:21
ResourceKind
The kind of resource for an SRV or UAV resource.
Definition: DXILABI.h:35
ResourceClass
Definition: DXILABI.h:26
ExtPropTags
Metadata tags for extra resource properties.
Definition: DXILABI.h:82
SamplerFeedbackType
Definition: DXILABI.h:95
ElementType
The element type of an SRV or UAV resource.
Definition: DXILABI.h:59
const unsigned MaxWaveSize
Definition: DXILABI.h:101
const unsigned MinWaveSize
Definition: DXILABI.h:100
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18