XII Release 0.1.0
Loading...
Searching...
No Matches
xiiGALShaderByteCode Class Reference

#include <ShaderByteCode.h>

Inheritance diagram for xiiGALShaderByteCode:
[legend]

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)
Public Member Functions inherited from xiiGALObject
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.
Public Member Functions inherited from xiiReflectedClass
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.
Public Member Functions inherited from xiiRefCounted
virtual ~xiiRefCounted ()=default
 Adds a virtual destructor.
Public Member Functions inherited from xiiRefCountingImpl
 xiiRefCountingImpl ()=default
 Constructor.
 xiiRefCountingImpl (const xiiRefCountingImpl &rhs)
void operator= (const xiiRefCountingImpl &rhs)
xiiUInt32 AddRef () const
 Increments the reference counter. Returns the new reference count.
bool TryAddRef () const
xiiUInt32 ReleaseRef () const
 Decrements the reference counter. Returns the new reference count.ywat.
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 Public Member Functions inherited from xiiNoBase
static const xiiRTTI * GetStaticRTTI ()
Protected Member Functions inherited from xiiGALObject
 xiiGALObject ()
 Copyright (c) Theophilus Eriata. All Rights Reserved.
virtual XII_ALWAYS_INLINE void SetDebugNamePlatform (xiiStringView sName) const

Detailed Description

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.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/GraphicsFoundation/Shader/ShaderByteCode.h
  • /home/runner/work/XII/XII/Source/Engine/GraphicsFoundation/Shader/Implementation/ShaderByteCode.cpp