LLVM 20.0.0git
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::dxil::ResourceInfo Class Reference

#include "llvm/Analysis/DXILResource.h"

Public Member Functions

 ResourceInfo (dxil::ResourceClass RC, dxil::ResourceKind Kind, Value *Symbol, StringRef Name)
 
bool isUAV () const
 
bool isCBuffer () const
 
bool isSampler () const
 
bool isStruct () const
 
bool isTyped () const
 
bool isFeedback () const
 
bool isMultiSample () const
 
void bind (uint32_t RecordID, uint32_t Space, uint32_t LowerBound, uint32_t Size)
 
void setUAV (bool GloballyCoherent, bool HasCounter, bool IsROV)
 
void setCBuffer (uint32_t Size)
 
void setSampler (dxil::SamplerType Ty)
 
void setStruct (uint32_t Stride, MaybeAlign Alignment)
 
void setTyped (dxil::ElementType ElementTy, uint32_t ElementCount)
 
void setFeedback (dxil::SamplerFeedbackType Type)
 
void setMultiSample (uint32_t Count)
 
bool operator== (const ResourceInfo &RHS) const
 
MDTuplegetAsMetadata (LLVMContext &Ctx) const
 
ResourceBinding getBinding () const
 
std::pair< uint32_t, uint32_tgetAnnotateProps () const
 
void print (raw_ostream &OS) const
 

Static Public Member Functions

static ResourceInfo SRV (Value *Symbol, StringRef Name, dxil::ElementType ElementTy, uint32_t ElementCount, dxil::ResourceKind Kind)
 
static ResourceInfo RawBuffer (Value *Symbol, StringRef Name)
 
static ResourceInfo StructuredBuffer (Value *Symbol, StringRef Name, uint32_t Stride, MaybeAlign Alignment)
 
static ResourceInfo Texture2DMS (Value *Symbol, StringRef Name, dxil::ElementType ElementTy, uint32_t ElementCount, uint32_t SampleCount)
 
static ResourceInfo Texture2DMSArray (Value *Symbol, StringRef Name, dxil::ElementType ElementTy, uint32_t ElementCount, uint32_t SampleCount)
 
static ResourceInfo UAV (Value *Symbol, StringRef Name, dxil::ElementType ElementTy, uint32_t ElementCount, bool GloballyCoherent, bool IsROV, dxil::ResourceKind Kind)
 
static ResourceInfo RWRawBuffer (Value *Symbol, StringRef Name, bool GloballyCoherent, bool IsROV)
 
static ResourceInfo RWStructuredBuffer (Value *Symbol, StringRef Name, uint32_t Stride, MaybeAlign Alignment, bool GloballyCoherent, bool IsROV, bool HasCounter)
 
static ResourceInfo RWTexture2DMS (Value *Symbol, StringRef Name, dxil::ElementType ElementTy, uint32_t ElementCount, uint32_t SampleCount, bool GloballyCoherent)
 
static ResourceInfo RWTexture2DMSArray (Value *Symbol, StringRef Name, dxil::ElementType ElementTy, uint32_t ElementCount, uint32_t SampleCount, bool GloballyCoherent)
 
static ResourceInfo FeedbackTexture2D (Value *Symbol, StringRef Name, dxil::SamplerFeedbackType FeedbackTy)
 
static ResourceInfo FeedbackTexture2DArray (Value *Symbol, StringRef Name, dxil::SamplerFeedbackType FeedbackTy)
 
static ResourceInfo CBuffer (Value *Symbol, StringRef Name, uint32_t Size)
 
static ResourceInfo Sampler (Value *Symbol, StringRef Name, dxil::SamplerType SamplerTy)
 

Detailed Description

Definition at line 27 of file DXILResource.h.

Constructor & Destructor Documentation

◆ ResourceInfo()

llvm::dxil::ResourceInfo::ResourceInfo ( dxil::ResourceClass  RC,
dxil::ResourceKind  Kind,
Value Symbol,
StringRef  Name 
)
inline

Definition at line 121 of file DXILResource.h.

Member Function Documentation

◆ bind()

void llvm::dxil::ResourceInfo::bind ( uint32_t  RecordID,
uint32_t  Space,
uint32_t  LowerBound,
uint32_t  Size 
)
inline

Definition at line 134 of file DXILResource.h.

References Size.

◆ CBuffer()

ResourceInfo ResourceInfo::CBuffer ( Value Symbol,
StringRef  Name,
uint32_t  Size 
)
static

Definition at line 320 of file DXILResource.cpp.

References llvm::dxil::CBuffer, setCBuffer(), and Size.

◆ FeedbackTexture2D()

ResourceInfo ResourceInfo::FeedbackTexture2D ( Value Symbol,
StringRef  Name,
dxil::SamplerFeedbackType  FeedbackTy 
)
static

◆ FeedbackTexture2DArray()

ResourceInfo ResourceInfo::FeedbackTexture2DArray ( Value Symbol,
StringRef  Name,
dxil::SamplerFeedbackType  FeedbackTy 
)
static

◆ getAnnotateProps()

std::pair< uint32_t, uint32_t > ResourceInfo::getAnnotateProps ( ) const

◆ getAsMetadata()

MDTuple * ResourceInfo::getAsMetadata ( LLVMContext Ctx) const

◆ getBinding()

ResourceBinding llvm::dxil::ResourceInfo::getBinding ( ) const
inline

Definition at line 219 of file DXILResource.h.

◆ isCBuffer()

bool ResourceInfo::isCBuffer ( ) const

Definition at line 153 of file DXILResource.cpp.

References llvm::dxil::CBuffer.

Referenced by getAnnotateProps(), getAsMetadata(), operator==(), print(), and setCBuffer().

◆ isFeedback()

bool ResourceInfo::isFeedback ( ) const

◆ isMultiSample()

bool ResourceInfo::isMultiSample ( ) const

◆ isSampler()

bool ResourceInfo::isSampler ( ) const

Definition at line 155 of file DXILResource.cpp.

References llvm::dxil::Sampler.

Referenced by getAnnotateProps(), getAsMetadata(), operator==(), and print().

◆ isStruct()

bool ResourceInfo::isStruct ( ) const

◆ isTyped()

bool ResourceInfo::isTyped ( ) const

◆ isUAV()

bool ResourceInfo::isUAV ( ) const

Definition at line 151 of file DXILResource.cpp.

References llvm::dxil::UAV.

Referenced by getAnnotateProps(), getAsMetadata(), operator==(), print(), and setUAV().

◆ operator==()

bool ResourceInfo::operator== ( const ResourceInfo RHS) const

◆ print()

void ResourceInfo::print ( raw_ostream OS) const

◆ RawBuffer()

ResourceInfo ResourceInfo::RawBuffer ( Value Symbol,
StringRef  Name 
)
static

Definition at line 210 of file DXILResource.cpp.

References llvm::dxil::RawBuffer, and llvm::dxil::SRV.

◆ RWRawBuffer()

ResourceInfo ResourceInfo::RWRawBuffer ( Value Symbol,
StringRef  Name,
bool  GloballyCoherent,
bool  IsROV 
)
static

Definition at line 257 of file DXILResource.cpp.

References llvm::dxil::RawBuffer, setUAV(), and llvm::dxil::UAV.

◆ RWStructuredBuffer()

ResourceInfo ResourceInfo::RWStructuredBuffer ( Value Symbol,
StringRef  Name,
uint32_t  Stride,
MaybeAlign  Alignment,
bool  GloballyCoherent,
bool  IsROV,
bool  HasCounter 
)
static

Definition at line 264 of file DXILResource.cpp.

References setStruct(), setUAV(), llvm::dxil::StructuredBuffer, and llvm::dxil::UAV.

◆ RWTexture2DMS()

ResourceInfo ResourceInfo::RWTexture2DMS ( Value Symbol,
StringRef  Name,
dxil::ElementType  ElementTy,
uint32_t  ElementCount,
uint32_t  SampleCount,
bool  GloballyCoherent 
)
static

◆ RWTexture2DMSArray()

ResourceInfo ResourceInfo::RWTexture2DMSArray ( Value Symbol,
StringRef  Name,
dxil::ElementType  ElementTy,
uint32_t  ElementCount,
uint32_t  SampleCount,
bool  GloballyCoherent 
)
static

◆ Sampler()

ResourceInfo ResourceInfo::Sampler ( Value Symbol,
StringRef  Name,
dxil::SamplerType  SamplerTy 
)
static

Definition at line 327 of file DXILResource.cpp.

References llvm::dxil::Sampler, SamplerTy, and setSampler().

◆ setCBuffer()

void llvm::dxil::ResourceInfo::setCBuffer ( uint32_t  Size)
inline

Definition at line 147 of file DXILResource.h.

References assert(), CBufferSize, isCBuffer(), and Size.

Referenced by CBuffer().

◆ setFeedback()

void llvm::dxil::ResourceInfo::setFeedback ( dxil::SamplerFeedbackType  Type)
inline

Definition at line 162 of file DXILResource.h.

References assert(), Feedback, and isFeedback().

Referenced by FeedbackTexture2D(), and FeedbackTexture2DArray().

◆ setMultiSample()

void llvm::dxil::ResourceInfo::setMultiSample ( uint32_t  Count)
inline

Definition at line 166 of file DXILResource.h.

References assert(), and isMultiSample().

Referenced by RWTexture2DMS(), RWTexture2DMSArray(), Texture2DMS(), and Texture2DMSArray().

◆ setSampler()

void llvm::dxil::ResourceInfo::setSampler ( dxil::SamplerType  Ty)
inline

Definition at line 151 of file DXILResource.h.

References SamplerTy.

Referenced by Sampler().

◆ setStruct()

void llvm::dxil::ResourceInfo::setStruct ( uint32_t  Stride,
MaybeAlign  Alignment 
)
inline

Definition at line 152 of file DXILResource.h.

References assert(), isStruct(), llvm::Log2(), and Struct.

Referenced by RWStructuredBuffer(), and StructuredBuffer().

◆ setTyped()

void llvm::dxil::ResourceInfo::setTyped ( dxil::ElementType  ElementTy,
uint32_t  ElementCount 
)
inline

Definition at line 157 of file DXILResource.h.

References assert(), isTyped(), and Typed.

Referenced by RWTexture2DMS(), RWTexture2DMSArray(), SRV(), Texture2DMS(), Texture2DMSArray(), and UAV().

◆ setUAV()

void llvm::dxil::ResourceInfo::setUAV ( bool  GloballyCoherent,
bool  HasCounter,
bool  IsROV 
)
inline

◆ SRV()

ResourceInfo ResourceInfo::SRV ( Value Symbol,
StringRef  Name,
dxil::ElementType  ElementTy,
uint32_t  ElementCount,
dxil::ResourceKind  Kind 
)
static

Definition at line 200 of file DXILResource.cpp.

References assert(), isMultiSample(), isStruct(), isTyped(), setTyped(), and llvm::dxil::SRV.

◆ StructuredBuffer()

ResourceInfo ResourceInfo::StructuredBuffer ( Value Symbol,
StringRef  Name,
uint32_t  Stride,
MaybeAlign  Alignment 
)
static

Definition at line 215 of file DXILResource.cpp.

References setStruct(), llvm::dxil::SRV, and llvm::dxil::StructuredBuffer.

◆ Texture2DMS()

ResourceInfo ResourceInfo::Texture2DMS ( Value Symbol,
StringRef  Name,
dxil::ElementType  ElementTy,
uint32_t  ElementCount,
uint32_t  SampleCount 
)
static

◆ Texture2DMSArray()

ResourceInfo ResourceInfo::Texture2DMSArray ( Value Symbol,
StringRef  Name,
dxil::ElementType  ElementTy,
uint32_t  ElementCount,
uint32_t  SampleCount 
)
static

◆ UAV()

ResourceInfo ResourceInfo::UAV ( Value Symbol,
StringRef  Name,
dxil::ElementType  ElementTy,
uint32_t  ElementCount,
bool  GloballyCoherent,
bool  IsROV,
dxil::ResourceKind  Kind 
)
static

Member Data Documentation

◆ CBufferSize

uint32_t llvm::dxil::ResourceInfo::CBufferSize

Definition at line 107 of file DXILResource.h.

Referenced by getAnnotateProps(), getAsMetadata(), operator==(), print(), and setCBuffer().

◆ Feedback

FeedbackInfo llvm::dxil::ResourceInfo::Feedback

Definition at line 115 of file DXILResource.h.

Referenced by getAnnotateProps(), getAsMetadata(), operator==(), print(), and setFeedback().

◆ SamplerTy

dxil::SamplerType llvm::dxil::ResourceInfo::SamplerTy

Definition at line 108 of file DXILResource.h.

Referenced by getAnnotateProps(), getAsMetadata(), operator==(), print(), Sampler(), and setSampler().

◆ Struct

StructInfo llvm::dxil::ResourceInfo::Struct

Definition at line 113 of file DXILResource.h.

Referenced by getAnnotateProps(), getAsMetadata(), operator==(), print(), and setStruct().

◆ Typed

TypedInfo llvm::dxil::ResourceInfo::Typed

Definition at line 114 of file DXILResource.h.

Referenced by getAnnotateProps(), getAsMetadata(), operator==(), print(), and setTyped().

◆ UAVFlags

UAVInfo llvm::dxil::ResourceInfo::UAVFlags

Definition at line 106 of file DXILResource.h.

Referenced by getAnnotateProps(), getAsMetadata(), operator==(), print(), and setUAV().


The documentation for this class was generated from the following files: