15#ifndef LLVM_OBJECTYAML_DXCONTAINERYAML_H
16#define LLVM_OBJECTYAML_DXCONTAINERYAML_H
30namespace DXContainerYAML {
41 std::vector<llvm::yaml::Hex8>
Hash;
52 std::optional<uint32_t>
Size;
57 std::optional<std::vector<llvm::yaml::Hex8>>
DXIL;
60#define SHADER_FEATURE_FLAG(Num, DxilModuleNum, Val, Str) bool Val = false;
65#include "llvm/BinaryFormat/DXContainerConstants.def"
73 std::vector<llvm::yaml::Hex8>
Digest;
90#define ROOT_DESCRIPTOR_FLAG(Num, Enum, Flag) bool Enum = false;
91#include "llvm/BinaryFormat/DXContainerConstants.def"
103#define DESCRIPTOR_RANGE_FLAG(Num, Enum, Flag) bool Enum = false;
104#include "llvm/BinaryFormat/DXContainerConstants.def"
138 template <
typename T>
179 float MaxLOD = std::numeric_limits<float>::max();
206#define ROOT_SIGNATURE_FLAG(Num, Val) bool Val = false;
207#include "llvm/BinaryFormat/DXContainerConstants.def"
221 Indices(IdxTable.slice(El.IndicesOffset, El.Rows)),
293 std::optional<ShaderFeatureFlags>
Flags;
294 std::optional<ShaderHash>
Hash;
344 LLVM_ABI static void mapping(IO &IO,
373 LLVM_ABI static void mapping(IO &IO,
378 LLVM_ABI static void mapping(IO &IO,
392struct MappingContextTraits<DXContainerYAML::RootParameterLocationYaml,
400 LLVM_ABI static void mapping(IO &IO,
405 LLVM_ABI static void mapping(IO &IO,
410 LLVM_ABI static void mapping(IO &IO,
415 LLVM_ABI static void mapping(IO &IO,
420 LLVM_ABI static void mapping(IO &IO,
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static StringRef substr(StringRef Str, uint64_t Len)
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
#define LLVM_YAML_DECLARE_ENUM_TRAITS(Type)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Tagged union holding either a T or a Error.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
reference emplace_back(ArgTypes &&... Args)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
A table of densely packed, null-terminated strings indexed by offset.
The instances of the Type class are immutable: once they are created, they are never changed.
Represents a version number in the form major[.minor[.subminor[.build]]].
A range adaptor for a pair of iterators.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
constexpr std::underlying_type_t< Enum > to_underlying(Enum E)
Returns underlying integer value of an enum.
std::optional< uint32_t > DXILOffset
uint16_t DXILMajorVersion
std::optional< uint32_t > Size
uint16_t DXILMinorVersion
std::optional< std::vector< llvm::yaml::Hex8 > > DXIL
std::optional< uint32_t > DXILSize
uint32_t OffsetInDescriptorsFromTableStart
uint32_t BaseShaderRegister
LLVM_ABI uint32_t getEncodedFlags() const
SmallVector< DescriptorRangeYaml > Ranges
std::vector< Part > Parts
std::array< MaskVector, 4 > InputOutputMap
MaskVector PatchOutputMap
SmallVector< SignatureElement > SigOutputElements
MaskVector PatchOrPrimMasks
SmallVector< SignatureElement > SigPatchOrPrimElements
SmallVector< ResourceBindInfo > Resources
SmallVector< SignatureElement > SigInputElements
LLVM_ABI void mapInfoForVersion(yaml::IO &IO)
dxbc::PSV::v3::RuntimeInfo Info
std::array< MaskVector, 4 > OutputVectorMasks
std::optional< PSVInfo > Info
std::optional< DXContainerYAML::RootSignatureYamlDesc > RootSignature
std::optional< DXILProgram > Program
std::optional< DXContainerYAML::Signature > Signature
std::optional< ShaderHash > Hash
std::optional< ShaderFeatureFlags > Flags
Part(std::string N, uint32_t S)
LLVM_ABI uint32_t getEncodedFlags() const
RootDescriptorYaml()=default
std::optional< size_t > IndexInSignature
RootParameterLocationYaml(RootParameterHeaderYaml Header)
RootParameterLocationYaml()
RootParameterHeaderYaml Header
RootDescriptorYaml & getOrInsertDescriptor(RootParameterLocationYaml &ParamDesc)
T & getOrInsertImpl(RootParameterLocationYaml &ParamDesc, SmallVectorImpl< T > &Container)
SmallVector< RootParameterLocationYaml > Locations
RootConstantsYaml & getOrInsertConstants(RootParameterLocationYaml &ParamDesc)
void insertLocation(RootParameterLocationYaml &Location)
DescriptorTableYaml & getOrInsertTable(RootParameterLocationYaml &ParamDesc)
SmallVector< RootConstantsYaml > Constants
SmallVector< RootDescriptorYaml > Descriptors
SmallVector< DescriptorTableYaml > Tables
uint32_t NumRootParameters
uint32_t NumStaticSamplers
iterator_range< StaticSamplerYamlDesc * > samplers()
SmallVector< StaticSamplerYamlDesc > StaticSamplers
std::optional< uint32_t > RootParametersOffset
RootSignatureYamlDesc()=default
LLVM_ABI uint32_t getEncodedFlags()
static LLVM_ABI llvm::Expected< DXContainerYAML::RootSignatureYamlDesc > create(const object::DirectX::RootSignature &Data)
RootParameterYamlDesc Parameters
std::optional< uint32_t > StaticSamplersOffset
ShaderFeatureFlags()=default
LLVM_ABI uint64_t getEncodedFlags()
std::vector< llvm::yaml::Hex8 > Digest
SignatureElement(dxbc::PSV::v0::SignatureElement El, StringRef StringTable, ArrayRef< uint32_t > IdxTable)
dxbc::PSV::ComponentType Type
dxbc::PSV::InterpolationMode Mode
llvm::yaml::Hex8 DynamicMask
dxbc::PSV::SemanticKind Kind
SmallVector< uint32_t > Indices
SignatureElement()=default
dxbc::SigComponentType CompType
dxbc::SigMinPrecision MinPrecision
dxbc::D3DSystemValue SystemValue
llvm::SmallVector< SignatureParameter > Parameters
uint32_t ShaderVisibility