13#ifndef LLVM_BINARYFORMAT_DXCONTAINER_H
14#define LLVM_BINARYFORMAT_DXCONTAINER_H
25template <
typename T>
struct EnumEntry;
45 "Shader kind out of expected range.");
101 return StringRef(
reinterpret_cast<const char *
>(&
Name[0]), 4);
138 return (Major << 4) | Minor;
142static_assert(
sizeof(ProgramHeader) == 24,
"ProgramHeader Size incorrect!");
144#define CONTAINER_PART(Part) Part,
147#include "DXContainerConstants.def"
150#define SHADER_FEATURE_FLAG(Num, DxilModuleNum, Val, Str) Val = 1ull << Num,
152#include "DXContainerConstants.def"
154static_assert((
uint64_t)FeatureFlags::NextUnusedBit <= 1ull << 63,
155 "Shader flag bits exceed enum size.");
157#define ROOT_ELEMENT_FLAG(Num, Val) Val = 1ull << Num,
159#include "DXContainerConstants.def"
283static_assert(
sizeof(PipelinePSVInfo) == 4 *
sizeof(
uint32_t),
284 "Pipeline-specific PSV info must fit in 16 bytes.");
288#define SEMANTIC_KIND(Val, Enum) Enum = Val,
290#include "DXContainerConstants.def"
295#define COMPONENT_TYPE(Val, Enum) Enum = Val,
297#include "DXContainerConstants.def"
302#define INTERPOLATION_MODE(Val, Enum) Enum = Val,
304#include "DXContainerConstants.def"
309#define RESOURCE_TYPE(Val, Enum) Enum = Val,
311#include "DXContainerConstants.def"
316#define RESOURCE_KIND(Val, Enum) Enum = Val,
318#include "DXContainerConstants.def"
323#define RESOURCE_FLAG(Index, Enum) bool Enum = false;
327#include "llvm/BinaryFormat/DXContainerConstants.def"
390static_assert(
sizeof(SignatureElement) == 4 *
sizeof(
uint32_t),
391 "PSV Signature elements must fit in 16 bytes.");
483#define COMPONENT_PRECISION(Val, Enum) Enum = Val,
485#include "DXContainerConstants.def"
490#define D3D_SYSTEM_VALUE(Val, Enum) Enum = Val,
492#include "DXContainerConstants.def"
497#define COMPONENT_TYPE(Val, Enum) Enum = Val,
499#include "DXContainerConstants.def"
548static_assert(
sizeof(ProgramSignatureElement) == 32,
549 "ProgramSignatureElement is misaligned");
554 if ((Flags & ~0x80000fff) != 0)
555 return llvm::make_error<BinaryStreamError>(
"Invalid Root Signature flag");
563 return llvm::make_error<BinaryStreamError>(
564 "Invalid Root Signature Version");
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Tagged union holding either a T or a Error.
Wrapper class representing virtual and physical registers.
StringRef - 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.
ArrayRef< EnumEntry< ResourceKind > > getResourceKinds()
ArrayRef< EnumEntry< ComponentType > > getComponentTypes()
ArrayRef< EnumEntry< ResourceType > > getResourceTypes()
ArrayRef< EnumEntry< SemanticKind > > getSemanticKinds()
ArrayRef< EnumEntry< InterpolationMode > > getInterpolationModes()
PartType parsePartType(StringRef S)
Triple::EnvironmentType getShaderStage(uint32_t Kind)
ArrayRef< EnumEntry< SigComponentType > > getSigComponentTypes()
ArrayRef< EnumEntry< SigMinPrecision > > getSigMinPrecisions()
ArrayRef< EnumEntry< D3DSystemValue > > getD3DSystemValues()
void swapByteOrder(T &Value)
This is an optimization pass for GlobalISel generic memory operations.
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
static Expected< uint32_t > validateVersion(uint32_t Version)
static Expected< uint32_t > validateRootFlag(uint32_t Flags)
uint8_t OutputPositionPresent
void swapBytes(Triple::EnvironmentType Stage)