diff options
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/Frontend/HLSL/HLSLResource.h')
-rw-r--r-- | contrib/llvm-project/llvm/include/llvm/Frontend/HLSL/HLSLResource.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/Frontend/HLSL/HLSLResource.h b/contrib/llvm-project/llvm/include/llvm/Frontend/HLSL/HLSLResource.h index eedecaea4e58..068b4c66711e 100644 --- a/contrib/llvm-project/llvm/include/llvm/Frontend/HLSL/HLSLResource.h +++ b/contrib/llvm-project/llvm/include/llvm/Frontend/HLSL/HLSLResource.h @@ -54,6 +54,30 @@ enum class ResourceKind : uint32_t { NumEntries, }; +// The value ordering of this enumeration is part of the DXIL ABI. Elements +// can only be added to the end, and not removed. +enum class ElementType : uint32_t { + Invalid = 0, + I1, + I16, + U16, + I32, + U32, + I64, + U64, + F16, + F32, + F64, + SNormF16, + UNormF16, + SNormF32, + UNormF32, + SNormF64, + UNormF64, + PackedS8x32, + PackedU8x32, +}; + class FrontendResource { MDNode *Entry; @@ -62,12 +86,13 @@ public: assert(Entry->getNumOperands() == 6 && "Unexpected metadata shape"); } - FrontendResource(GlobalVariable *GV, StringRef TypeStr, ResourceKind RK, + FrontendResource(GlobalVariable *GV, ResourceKind RK, ElementType ElTy, bool IsROV, uint32_t ResIndex, uint32_t Space); GlobalVariable *getGlobalVariable(); StringRef getSourceType(); ResourceKind getResourceKind(); + ElementType getElementType(); bool getIsROV(); uint32_t getResourceIndex(); uint32_t getSpace(); |