LLVM 22.0.0git
DXContainerRootSignature.h
Go to the documentation of this file.
1//===- llvm/MC/DXContainerRootSignature.h - RootSignature -*- 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#ifndef LLVM_MC_DXCONTAINERROOTSIGNATURE_H
10#define LLVM_MC_DXCONTAINERROOTSIGNATURE_H
11
14#include <cstdint>
15#include <limits>
16
17namespace llvm {
18
19class raw_ostream;
20namespace mcdxbc {
21
27
33
42
52
62
80
83
87
89 size_t Location) {
90 ParametersInfo.emplace_back(Type, Visibility, Location);
91 }
92
98
100 dxbc::ShaderVisibility Visibility,
101 RootDescriptor Descriptor) {
102 addInfo(Type, Visibility, Descriptors.size());
103 Descriptors.push_back(Descriptor);
104 }
105
107 dxbc::ShaderVisibility Visibility, DescriptorTable Table) {
108 addInfo(Type, Visibility, Tables.size());
109 Tables.push_back(Table);
110 }
111
112 const RootParameterInfo &getInfo(uint32_t Location) const {
113 const RootParameterInfo &Info = ParametersInfo[Location];
114 return Info;
115 }
116
117 const RootConstants &getConstant(size_t Index) const {
118 return Constants[Index];
119 }
120
121 const RootDescriptor &getRootDescriptor(size_t Index) const {
122 return Descriptors[Index];
123 }
124
125 const DescriptorTable &getDescriptorTable(size_t Index) const {
126 return Tables[Index];
127 }
128
129 size_t size() const { return ParametersInfo.size(); }
130
137};
154} // namespace mcdxbc
155} // namespace llvm
156
157#endif // LLVM_MC_DXCONTAINERROOTSIGNATURE_H
Analysis containing CSE Info
Definition CSEInfo.cpp:27
#define LLVM_ABI
Definition Compiler.h:213
This is an important base class in LLVM.
Definition Constant.h:43
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:45
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
SmallVector< DescriptorRange > Ranges
SmallVector< DescriptorRange >::const_iterator begin() const
SmallVector< DescriptorRange >::const_iterator end() const
RootParameterInfo(dxbc::RootParameterType Type, dxbc::ShaderVisibility Visibility, size_t Location)
const RootDescriptor & getRootDescriptor(size_t Index) const
const DescriptorTable & getDescriptorTable(size_t Index) const
void addParameter(dxbc::RootParameterType Type, dxbc::ShaderVisibility Visibility, RootDescriptor Descriptor)
SmallVector< RootParameterInfo >::const_iterator begin() const
void addParameter(dxbc::RootParameterType Type, dxbc::ShaderVisibility Visibility, DescriptorTable Table)
SmallVector< RootParameterInfo > ParametersInfo
void addInfo(dxbc::RootParameterType Type, dxbc::ShaderVisibility Visibility, size_t Location)
const RootConstants & getConstant(size_t Index) const
void addParameter(dxbc::RootParameterType Type, dxbc::ShaderVisibility Visibility, RootConstants Constant)
SmallVector< RootParameterInfo >::const_iterator end() const
const RootParameterInfo & getInfo(uint32_t Location) const
LLVM_ABI uint32_t computeRootParametersOffset() const
LLVM_ABI void write(raw_ostream &OS) const
SmallVector< StaticSampler > StaticSamplers
LLVM_ABI uint32_t computeStaticSamplersOffset() const
mcdxbc::RootParametersContainer ParametersContainer
dxbc::TextureAddressMode AddressU
dxbc::TextureAddressMode AddressV
dxbc::StaticBorderColor BorderColor
dxbc::TextureAddressMode AddressW
dxbc::ShaderVisibility ShaderVisibility