|
clang 22.0.0git
|
#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CGHLSLRuntime.h"
Public Member Functions | |
| uint32_t | operator[] (size_t I) const |
| Get the given offset, or ~0U if there is no offset for the member. | |
| bool | empty () const |
Static Public Member Functions | |
| static CGHLSLOffsetInfo | fromDecl (const HLSLBufferDecl &BufDecl) |
| Iterates over all declarations in the HLSL buffer and based on the packoffset or register(c#) annotations it fills outs the Offsets vector with the user-specified layout offsets. | |
| static bool | compareOffsets (uint32_t LHS, uint32_t RHS) |
| Comparison function for offsets received from operator[] suitable for use in a stable_sort. | |
Static Public Attributes | |
| static const uint32_t | Unspecified = ~0U |
Definition at line 83 of file CGHLSLRuntime.h.
|
inlinestatic |
Comparison function for offsets received from operator[] suitable for use in a stable_sort.
This will order implicit bindings after explicit offsets.
Definition at line 105 of file CGHLSLRuntime.h.
Referenced by clang::CodeGen::HLSLBufferLayoutBuilder::layOutStruct().
|
inline |
Definition at line 114 of file CGHLSLRuntime.h.
Referenced by clang::CodeGen::HLSLBufferLayoutBuilder::layOutStruct().
|
static |
Iterates over all declarations in the HLSL buffer and based on the packoffset or register(c#) annotations it fills outs the Offsets vector with the user-specified layout offsets.
The buffer offsets can be specified 2 ways: 1. declarations in cbuffer {} block can have a packoffset annotation (translates to HLSLPackOffsetAttr) 2. default constant buffer declarations at global scope can have register(c#) annotations (translates to HLSLResourceBindingAttr with RegisterType::C) It is not guaranteed that all declarations in a buffer have an annotation. For those where it is not specified a ~0U value is added to the Offsets vector. In the final layout these declarations will be placed at the end of the HLSL buffer after all of the elements with specified offset.
Definition at line 372 of file CGHLSLRuntime.cpp.
References clang::HLSLBufferDecl::buffer_decls(), clang::CodeGen::Decl, clang::QualType::getAddressSpace(), clang::Decl::getAttrs(), clang::ValueDecl::getType(), clang::Decl::hasAttrs(), clang::HLSLBufferDecl::hasValidPackoffset(), clang::hlsl_constant, clang::isa(), clang::Result, and Unspecified.
Referenced by clang::CodeGen::CGHLSLRuntime::addBuffer().
|
inline |
Get the given offset, or ~0U if there is no offset for the member.
Definition at line 108 of file CGHLSLRuntime.h.
References Unspecified.
|
static |
Definition at line 87 of file CGHLSLRuntime.h.
Referenced by fromDecl(), clang::CodeGen::HLSLBufferLayoutBuilder::layOutStruct(), and operator[]().