LLVM
22.0.0git
include
llvm
Support
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
23
namespace
llvm
{
24
namespace
dxil
{
25
26
enum class
ResourceClass
:
uint8_t
{
27
SRV
= 0,
28
UAV
,
29
CBuffer
,
30
Sampler
,
31
LastEntry
=
Sampler
,
32
};
33
34
/// The kind of resource for an SRV or UAV resource. Sometimes referred to as
35
/// "Shape" in the DXIL docs.
36
enum class
ResourceKind
:
uint32_t
{
37
Invalid
= 0,
38
Texture1D
,
39
Texture2D
,
40
Texture2DMS
,
41
Texture3D
,
42
TextureCube
,
43
Texture1DArray
,
44
Texture2DArray
,
45
Texture2DMSArray
,
46
TextureCubeArray
,
47
TypedBuffer
,
48
RawBuffer
,
49
StructuredBuffer
,
50
CBuffer
,
51
Sampler
,
52
TBuffer
,
53
RTAccelerationStructure
,
54
FeedbackTexture2D
,
55
FeedbackTexture2DArray
,
56
NumEntries
,
57
};
58
59
/// The element type of an SRV or UAV resource.
60
enum class
ElementType
:
uint32_t
{
61
Invalid
= 0,
62
I1
,
63
I16
,
64
U16
,
65
I32
,
66
U32
,
67
I64
,
68
U64
,
69
F16
,
70
F32
,
71
F64
,
72
SNormF16
,
73
UNormF16
,
74
SNormF32
,
75
UNormF32
,
76
SNormF64
,
77
UNormF64
,
78
PackedS8x32
,
79
PackedU8x32
,
80
};
81
82
/// Metadata tags for extra resource properties.
83
enum class
ExtPropTags
:
uint32_t
{
84
ElementType
= 0,
85
StructuredBufferStride
= 1,
86
SamplerFeedbackKind
= 2,
87
Atomic64Use
= 3,
88
};
89
90
enum class
SamplerType
:
uint32_t
{
91
Default
= 0,
92
Comparison
= 1,
93
Mono
= 2,
// Note: Seems to be unused.
94
};
95
96
enum class
SamplerFeedbackType
:
uint32_t
{
97
MinMip
= 0,
98
MipRegionUsed
= 1,
99
};
100
101
const
unsigned
MinWaveSize
= 4;
102
const
unsigned
MaxWaveSize
= 128;
103
104
LLVM_ABI
StringRef
getResourceClassName
(
ResourceClass
RC);
105
}
// namespace dxil
106
}
// namespace llvm
107
108
#endif
// LLVM_SUPPORT_DXILABI_H
LLVM_ABI
#define LLVM_ABI
Definition
Compiler.h:213
StringRef.h
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition
StringRef.h:55
uint32_t
uint8_t
llvm::dxil
Definition
DXILMetadataAnalysis.h:21
llvm::dxil::getResourceClassName
LLVM_ABI StringRef getResourceClassName(ResourceClass RC)
Definition
DXILABI.cpp:21
llvm::dxil::ResourceKind
ResourceKind
The kind of resource for an SRV or UAV resource.
Definition
DXILABI.h:36
llvm::dxil::ResourceKind::FeedbackTexture2D
@ FeedbackTexture2D
Definition
DXILABI.h:54
llvm::dxil::ResourceKind::TextureCube
@ TextureCube
Definition
DXILABI.h:42
llvm::dxil::ResourceKind::TypedBuffer
@ TypedBuffer
Definition
DXILABI.h:47
llvm::dxil::ResourceKind::FeedbackTexture2DArray
@ FeedbackTexture2DArray
Definition
DXILABI.h:55
llvm::dxil::ResourceKind::NumEntries
@ NumEntries
Definition
DXILABI.h:56
llvm::dxil::ResourceKind::Texture2DArray
@ Texture2DArray
Definition
DXILABI.h:44
llvm::dxil::ResourceKind::TBuffer
@ TBuffer
Definition
DXILABI.h:52
llvm::dxil::ResourceKind::Texture2DMS
@ Texture2DMS
Definition
DXILABI.h:40
llvm::dxil::ResourceKind::Texture3D
@ Texture3D
Definition
DXILABI.h:41
llvm::dxil::ResourceKind::RTAccelerationStructure
@ RTAccelerationStructure
Definition
DXILABI.h:53
llvm::dxil::ResourceKind::Texture1DArray
@ Texture1DArray
Definition
DXILABI.h:43
llvm::dxil::ResourceKind::Texture2D
@ Texture2D
Definition
DXILABI.h:39
llvm::dxil::ResourceKind::TextureCubeArray
@ TextureCubeArray
Definition
DXILABI.h:46
llvm::dxil::ResourceKind::StructuredBuffer
@ StructuredBuffer
Definition
DXILABI.h:49
llvm::dxil::ResourceKind::RawBuffer
@ RawBuffer
Definition
DXILABI.h:48
llvm::dxil::ResourceKind::Texture2DMSArray
@ Texture2DMSArray
Definition
DXILABI.h:45
llvm::dxil::ResourceKind::Texture1D
@ Texture1D
Definition
DXILABI.h:38
llvm::dxil::ResourceClass
ResourceClass
Definition
DXILABI.h:26
llvm::dxil::ResourceClass::Sampler
@ Sampler
Definition
DXILABI.h:30
llvm::dxil::ResourceClass::UAV
@ UAV
Definition
DXILABI.h:28
llvm::dxil::ResourceClass::CBuffer
@ CBuffer
Definition
DXILABI.h:29
llvm::dxil::ResourceClass::LastEntry
@ LastEntry
Definition
DXILABI.h:31
llvm::dxil::ResourceClass::SRV
@ SRV
Definition
DXILABI.h:27
llvm::dxil::ExtPropTags
ExtPropTags
Metadata tags for extra resource properties.
Definition
DXILABI.h:83
llvm::dxil::ExtPropTags::SamplerFeedbackKind
@ SamplerFeedbackKind
Definition
DXILABI.h:86
llvm::dxil::ExtPropTags::StructuredBufferStride
@ StructuredBufferStride
Definition
DXILABI.h:85
llvm::dxil::ExtPropTags::Atomic64Use
@ Atomic64Use
Definition
DXILABI.h:87
llvm::dxil::ResourceCounterDirection::Invalid
@ Invalid
Definition
DXILResource.h:368
llvm::dxil::SamplerType
SamplerType
Definition
DXILABI.h:90
llvm::dxil::SamplerType::Mono
@ Mono
Definition
DXILABI.h:93
llvm::dxil::SamplerType::Default
@ Default
Definition
DXILABI.h:91
llvm::dxil::SamplerType::Comparison
@ Comparison
Definition
DXILABI.h:92
llvm::dxil::SamplerFeedbackType
SamplerFeedbackType
Definition
DXILABI.h:96
llvm::dxil::SamplerFeedbackType::MinMip
@ MinMip
Definition
DXILABI.h:97
llvm::dxil::SamplerFeedbackType::MipRegionUsed
@ MipRegionUsed
Definition
DXILABI.h:98
llvm::dxil::ElementType
ElementType
The element type of an SRV or UAV resource.
Definition
DXILABI.h:60
llvm::dxil::ElementType::UNormF16
@ UNormF16
Definition
DXILABI.h:73
llvm::dxil::ElementType::PackedU8x32
@ PackedU8x32
Definition
DXILABI.h:79
llvm::dxil::ElementType::F64
@ F64
Definition
DXILABI.h:71
llvm::dxil::ElementType::UNormF64
@ UNormF64
Definition
DXILABI.h:77
llvm::dxil::ElementType::U64
@ U64
Definition
DXILABI.h:68
llvm::dxil::ElementType::SNormF64
@ SNormF64
Definition
DXILABI.h:76
llvm::dxil::ElementType::F32
@ F32
Definition
DXILABI.h:70
llvm::dxil::ElementType::F16
@ F16
Definition
DXILABI.h:69
llvm::dxil::ElementType::UNormF32
@ UNormF32
Definition
DXILABI.h:75
llvm::dxil::ElementType::SNormF16
@ SNormF16
Definition
DXILABI.h:72
llvm::dxil::ElementType::SNormF32
@ SNormF32
Definition
DXILABI.h:74
llvm::dxil::ElementType::I1
@ I1
Definition
DXILABI.h:62
llvm::dxil::ElementType::I16
@ I16
Definition
DXILABI.h:63
llvm::dxil::ElementType::U32
@ U32
Definition
DXILABI.h:66
llvm::dxil::ElementType::PackedS8x32
@ PackedS8x32
Definition
DXILABI.h:78
llvm::dxil::ElementType::I32
@ I32
Definition
DXILABI.h:65
llvm::dxil::ElementType::I64
@ I64
Definition
DXILABI.h:67
llvm::dxil::ElementType::U16
@ U16
Definition
DXILABI.h:64
llvm::dxil::MaxWaveSize
const unsigned MaxWaveSize
Definition
DXILABI.h:102
llvm::dxil::MinWaveSize
const unsigned MinWaveSize
Definition
DXILABI.h:101
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
Types.h:26
Generated on
for LLVM by
1.14.0