|
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. | |
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 Public Attributes | |
| static const uint32_t | Unspecified = ~0U |
Definition at line 84 of file CGHLSLRuntime.h.
|
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 360 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 104 of file CGHLSLRuntime.h.
References Unspecified.
|
static |
Definition at line 88 of file CGHLSLRuntime.h.
Referenced by clang::CodeGen::HLSLBufferLayoutBuilder::createLayoutType(), fromDecl(), and operator[]().