13#ifndef LLVM_BINARYFORMAT_DXCONTAINER_H
14#define LLVM_BINARYFORMAT_DXCONTAINER_H
51 "Shader kind out of expected range.");
107 return StringRef(
reinterpret_cast<const char *
>(&
Name[0]), 4);
144 return (Major << 4) | Minor;
148static_assert(
sizeof(ProgramHeader) == 24,
"ProgramHeader Size incorrect!");
150#define CONTAINER_PART(Part) Part,
153#include "DXContainerConstants.def"
156#define SHADER_FEATURE_FLAG(Num, DxilModuleNum, Val, Str) Val = 1ull << Num,
158#include "DXContainerConstants.def"
160static_assert((
uint64_t)FeatureFlags::NextUnusedBit <= 1ull << 63,
161 "Shader flag bits exceed enum size.");
163#define ROOT_SIGNATURE_FLAG(Num, Val) Val = Num,
165#include "DXContainerConstants.def"
172#define ROOT_DESCRIPTOR_FLAG(Num, Enum, Flag) Enum = Num,
174#include "DXContainerConstants.def"
181#define DESCRIPTOR_RANGE_FLAG(Num, Enum, Flag) Enum = Num,
183#include "DXContainerConstants.def"
190#define STATIC_SAMPLER_FLAG(Num, Enum, Flag) Enum = Num,
192#include "DXContainerConstants.def"
199#define ROOT_PARAMETER(Val, Enum) Enum = Val,
201#include "DXContainerConstants.def"
210#define SHADER_VISIBILITY(Val, Enum) Enum = Val,
212#include "DXContainerConstants.def"
219#define FILTER(Val, Enum) Enum = Val,
221#include "DXContainerConstants.def"
228#define TEXTURE_ADDRESS_MODE(Val, Enum) Enum = Val,
230#include "DXContainerConstants.def"
237#define COMPARISON_FUNC(Val, Enum) Enum = Val,
239#include "DXContainerConstants.def"
246#define STATIC_BORDER_COLOR(Val, Enum) Enum = Val,
248#include "DXContainerConstants.def"
387static_assert(
sizeof(PipelinePSVInfo) == 4 *
sizeof(
uint32_t),
388 "Pipeline-specific PSV info must fit in 16 bytes.");
392#define SEMANTIC_KIND(Val, Enum) Enum = Val,
394#include "DXContainerConstants.def"
399#define COMPONENT_TYPE(Val, Enum) Enum = Val,
401#include "DXContainerConstants.def"
406#define INTERPOLATION_MODE(Val, Enum) Enum = Val,
408#include "DXContainerConstants.def"
413#define RESOURCE_TYPE(Val, Enum) Enum = Val,
415#include "DXContainerConstants.def"
420#define RESOURCE_KIND(Val, Enum) Enum = Val,
422#include "DXContainerConstants.def"
427#define RESOURCE_FLAG(Index, Enum) bool Enum = false;
431#include "llvm/BinaryFormat/DXContainerConstants.def"
494static_assert(
sizeof(SignatureElement) == 4 *
sizeof(
uint32_t),
495 "PSV Signature elements must fit in 16 bytes.");
589#define COMPONENT_PRECISION(Val, Enum) Enum = Val,
591#include "DXContainerConstants.def"
596#define D3D_SYSTEM_VALUE(Val, Enum) Enum = Val,
598#include "DXContainerConstants.def"
603#define COMPONENT_TYPE(Val, Enum) Enum = Val,
605#include "DXContainerConstants.def"
654static_assert(
sizeof(ProgramSignatureElement) == 32,
655 "ProgramSignatureElement is misaligned");
826static_assert(
sizeof(DebugNameHeader) == 4,
"DebugNameHeader size incorrect.");
828#define VERSION_INFO_FLAG(Num, Val, Str) Val = Num,
830#include "llvm/BinaryFormat/DXContainerConstants.def"
855static_assert(
sizeof(CompilerVersionHeader) == 16,
856 "CompilerVersionHeader size incorrect.");
875static_assert(
sizeof(
Header) == 8,
"SourceInfo::Header size incorrect.");
877#define SOURCE_INFO_TYPE(Num, Val) Val = Num,
879#include "llvm/BinaryFormat/DXContainerConstants.def"
902static_assert(
sizeof(SectionHeader) == 8,
903 "SourceInfo::SectionHeader size incorrect.");
917static_assert(
sizeof(HeaderOnDisk) == 10,
918 "SourceInfo::Names::HeaderOnDisk size incorrect.");
940static_assert(
sizeof(Entry) == 16,
"SourceInfo::Names::Entry size incorrect.");
946#define COMPRESSION_TYPE(Num, Val) Val = Num,
948#include "llvm/BinaryFormat/DXContainerConstants.def"
984static_assert(
sizeof(
Header) == 20,
985 "SourceInfo::Contents::Header size incorrect.");
1008static_assert(
sizeof(Entry) == 12,
1009 "SourceInfo::Contents::Entry size incorrect.");
1035static_assert(
sizeof(
Header) == 12,
"SourceInfo::Args::Header size incorrect.");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_PACKED(d)
\macro LLVM_PACKED Used to specify a packed structure.
Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM_ABI EnumStrings< SemanticKind, 1 > getSemanticKinds()
LLVM_ABI EnumStrings< InterpolationMode, 1 > getInterpolationModes()
LLVM_ABI EnumStrings< ResourceKind, 1 > getResourceKinds()
LLVM_ABI EnumStrings< ComponentType, 1 > getComponentTypes()
LLVM_ABI EnumStrings< ResourceType, 1 > getResourceTypes()
LLVM_ABI bool isValidCompressionType(uint16_t V)
LLVM_ABI EnumStrings< CompressionType, 1 > getCompressionTypes()
LLVM_ABI bool isValidSectionType(uint16_t V)
LLVM_ABI StringRef getSectionName(SectionType Type)
LLVM_ABI EnumStrings< SectionType, 1 > getSectionTypes()
LLVM_ABI bool isValidShaderVisibility(uint32_t V)
LLVM_ABI PartType parsePartType(StringRef S)
LLVM_ABI bool isValidSamplerFilter(uint32_t V)
LLVM_ABI bool isValidStaticSamplerFlags(uint32_t V)
LLVM_ABI EnumStrings< TextureAddressMode, 1 > getTextureAddressModes()
LLVM_ABI EnumStrings< DescriptorRangeFlags, 1 > getDescriptorRangeFlags()
LLVM_ABI EnumStrings< RootDescriptorFlags, 1 > getRootDescriptorFlags()
LLVM_ABI bool isValidRootDesciptorFlags(uint32_t V)
LLVM_ABI EnumStrings< SigComponentType, 1 > getSigComponentTypes()
LLVM_ABI EnumStrings< D3DSystemValue, 1 > getD3DSystemValues()
Triple::EnvironmentType getShaderStage(uint32_t Kind)
LLVM_ABI bool isDebugProgramPart(PartType PT)
static constexpr uint64_t DXCONTAINER_STRUCT_ALIGNMENT
LLVM_ABI EnumStrings< RootParameterType, 1 > getRootParameterTypes()
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()
LLVM_ABI bool isProgramPart(StringRef PartName)
LLVM_ABI EnumStrings< SamplerFilter, 1 > getSamplerFilters()
LLVM_ABI EnumStrings< StaticBorderColor, 1 > getStaticBorderColors()
LLVM_ABI bool isValidCompilerVersionFlags(uint32_t V)
LLVM_ABI EnumStrings< ShaderVisibility, 1 > getShaderVisibility()
LLVM_ABI EnumStrings< ComparisonFunc, 1 > getComparisonFuncs()
LLVM_ABI bool isValidDescriptorRangeFlags(uint32_t V)
LLVM_ABI bool isValidBorderColor(uint32_t V)
LLVM_ABI bool isValidComparisonFunc(uint32_t V)
LLVM_ABI bool isValidParameterType(uint32_t V)
LLVM_ABI EnumStrings< RootFlags, 1 > getRootFlags()
LLVM_ABI const char * getProgramPartName(bool IsDebug)
LLVM_ABI EnumStrings< SigMinPrecision, 1 > getSigMinPrecisions()
LLVM_ABI EnumStrings< StaticSamplerFlags, 1 > getStaticSamplerFlags()
LLVM_ABI bool isValidAddress(uint32_t V)
LLVM_ABI bool isValidRangeType(uint32_t V)
void swapByteOrder(T &Value)
This is an optimization pass for GlobalISel generic memory operations.
@ LLVM_MARK_AS_BITMASK_ENUM
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Count
uint32_t PayloadSizeInBytes
uint32_t InputControlPointCount
uint32_t TessellatorDomain
uint8_t OutputPositionPresent
uint8_t OutputPositionPresent
uint32_t OutputStreamMask
uint32_t TessellatorOutputPrimitive
uint32_t OutputControlPointCount
uint32_t InputControlPointCount
uint32_t TessellatorDomain
uint32_t PayloadSizeInBytes
uint16_t MaxOutputVertices
uint16_t MaxOutputPrimitives
uint32_t GroupSharedBytesDependentOnViewID
uint32_t GroupSharedBytesUsed
bool operator==(const uint32_t RFlags) const
uint32_t MaximumWaveLaneCount
PipelinePSVInfo StageInfo
void swapBytes(Triple::EnvironmentType Stage)
uint32_t MinimumWaveLaneCount
uint8_t MeshOutputTopology
GeometryExtraInfo GeomData
uint8_t SigPatchOrPrimElements
uint8_t SigOutputVectors[4]
void swapBytes(Triple::EnvironmentType Stage)
uint8_t SigOutputElements
void swapBytes(Triple::EnvironmentType Stage)
void swapBytes(Triple::EnvironmentType Stage)
SigMinPrecision MinPrecision
D3DSystemValue SystemValue
SigComponentType CompType
uint32_t BaseShaderRegister
uint32_t OffsetInDescriptorsFromTableStart
uint32_t ShaderVisibility
uint32_t OffsetInDescriptorsFromTableStart
uint32_t BaseShaderRegister
RootDescriptor(v1::RootDescriptor &Base)
StaticSampler(v1::StaticSampler &Base)
LLVM_ABI bool isPopulated()
uint32_t AlignedSizeInBytes
Size of entry, including this header. Aligned to a 4-byte boundary.
uint32_t ContentSizeInBytes
Size of the file contents following this header, including the null terminator, excluding entry paddi...
void swapBytes()
Followed by a string of length ContentSizeInBytes-1 with HLSL source file content.
uint32_t Flags
Reserved, must be zero.
void swapBytes()
Followed by a string of size NameSizeInBytes with HLSL source file name.
uint32_t AlignedSizeInBytes
Size of entry, including this header. Aligned to a 4-byte boundary.
uint32_t ContentSizeInBytes
Size of the file content, including the null terminator.
uint32_t Flags
Reserved, must be set to zero.
uint32_t NameSizeInBytes
Size of the file name following this header, including the null terminator, excluding entry padding.
uint8_t OutputPositionPresent
void swapBytes(Triple::EnvironmentType Stage)