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
78
81
85
87 size_t Location) {
88 ParametersInfo.emplace_back(Type, Visibility, Location);
89 }
90
96
98 dxbc::ShaderVisibility Visibility,
99 RootDescriptor Descriptor) {
100 addInfo(Type, Visibility, Descriptors.size());
101 Descriptors.push_back(Descriptor);
102 }
103
105 dxbc::ShaderVisibility Visibility, DescriptorTable Table) {
106 addInfo(Type, Visibility, Tables.size());
107 Tables.push_back(Table);
108 }
109
110 const RootParameterInfo &getInfo(uint32_t Location) const {
111 const RootParameterInfo &Info = ParametersInfo[Location];
112 return Info;
113 }
114
115 const RootConstants &getConstant(size_t Index) const {
116 return Constants[Index];
117 }
118
119 const RootDescriptor &getRootDescriptor(size_t Index) const {
120 return Descriptors[Index];
121 }
122
123 const DescriptorTable &getDescriptorTable(size_t Index) const {
124 return Tables[Index];
125 }
126
127 size_t size() const { return ParametersInfo.size(); }
128
135};
152} // namespace mcdxbc
153} // namespace llvm
154
155#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