![]() |
XII Release 0.1.0
|
This class wraps shader byte code storage. More...
#include <ShaderByteCode.h>
Public Member Functions | |
xiiGALShaderByteCode (const xiiArrayPtr< const xiiUInt8 > &pByteCode) | |
XII_ALWAYS_INLINE const void * | GetByteCode () const |
This returns a raw pointer to the shader bytecode. | |
XII_ALWAYS_INLINE xiiUInt32 | GetSize () const |
This returns the size of the shader bytecode. | |
XII_ALWAYS_INLINE bool | IsValid () const |
This returns true if the shader bytecode is not empty, else returns false. | |
XII_ALWAYS_INLINE const xiiGALShaderResourceDescription * | GetDescription (const xiiTempHashedString &sName) const |
This retrieves the shader resource description of the resource with the given name. | |
void | CopyFrom (const xiiArrayPtr< const xiiUInt8 > &pByteCode) |
![]() | |
XII_ALWAYS_INLINE xiiStringView | GetDebugName () const |
Returns the debug name of this resource. | |
void | SetDebugName (xiiStringView sDebugName) const |
Sets the debug name for this resource. | |
![]() | |
virtual const xiiRTTI * | GetDynamicRTTI () const |
bool | IsInstanceOf (const xiiRTTI *pType) const |
Returns whether the type of this instance is of the given type or derived from it. | |
template<typename T> | |
XII_ALWAYS_INLINE bool | IsInstanceOf () const |
Returns whether the type of this instance is of the given type or derived from it. | |
![]() | |
virtual | ~xiiRefCounted ()=default |
Adds a virtual destructor. | |
![]() | |
xiiRefCountingImpl ()=default | |
Constructor. | |
xiiRefCountingImpl (const xiiRefCountingImpl &rhs) | |
void | operator= (const xiiRefCountingImpl &rhs) |
xiiUInt32 | AddRef () const |
Increments the reference counter. Returns the new reference count. | |
xiiUInt32 | ReleaseRef () const |
Decrements the reference counter. Returns the new reference count. | |
bool | IsReferenced () const |
Returns true if the reference count is greater than 0, false otherwise. | |
xiiUInt32 | GetRefCount () const |
Returns the current reference count. | |
Public Attributes | |
xiiDynamicArray< xiiUInt8 > | m_ByteCode |
xiiHybridArray< xiiGALShaderResourceDescription, 8U > | m_ShaderResourceBindings |
xiiHybridArray< xiiGALVertexInputLayout, 8U > | m_VertexInputLayout |
xiiUInt8 | m_uiTessellationPatchControlPoints = 0U |
xiiBitflags< xiiGALShaderType > | m_ShaderStage = xiiGALShaderType::Unknown |
bool | m_bWasCompiledWithDebug = false |
Additional Inherited Members | |
![]() | |
static const xiiRTTI * | GetStaticRTTI () |
![]() | |
virtual XII_ALWAYS_INLINE void | SetDebugNamePlatform (xiiStringView sName) const |
This class wraps shader byte code storage.
Since byte code can have different requirements for alignment, padding etc. this class manages it. Also since byte code is shared between multiple shaders (e.g. same vertex shaders for different pixel shaders) the instances of the byte codes are reference counted.