LLVM 24.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
33
41
42/// The kind of resource for an SRV or UAV resource. Sometimes referred to as
43/// "Shape" in the DXIL docs.
66
67/// The element type of an SRV or UAV resource.
90
91/// Metadata tags for extra resource properties.
98
99enum class SamplerType : uint32_t {
102 Mono = 2, // Note: Seems to be unused.
103};
104
109
110/// Opcodes for the DXIL `AtomicBinOp` op (78). Values must match the DXIL
111/// specification.
113 Add = 0,
114 And = 1,
115 Or = 2,
116 Xor = 3,
117 IMin = 4,
118 IMax = 5,
119 UMin = 6,
120 UMax = 7,
122};
123
124const unsigned MinWaveSize = 4;
125const unsigned MaxWaveSize = 128;
126
128} // namespace dxil
129} // namespace llvm
130
131#endif // LLVM_SUPPORT_DXILABI_H
#define LLVM_ABI
Definition Compiler.h:215
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
LLVM_ABI StringRef getResourceClassName(ResourceClass RC)
Definition DXILABI.cpp:21
ResourceKind
The kind of resource for an SRV or UAV resource.
Definition DXILABI.h:44
AtomicBinOpCode
Opcodes for the DXIL AtomicBinOp op (78).
Definition DXILABI.h:112
ExtPropTags
Metadata tags for extra resource properties.
Definition DXILABI.h:92
ResourceDimension
Definition DXILABI.h:34
SamplerFeedbackType
Definition DXILABI.h:105
ElementType
The element type of an SRV or UAV resource.
Definition DXILABI.h:68
const unsigned MaxWaveSize
Definition DXILABI.h:125
const unsigned MinWaveSize
Definition DXILABI.h:124
This is an optimization pass for GlobalISel generic memory operations.