XII Release 0.1.0
Loading...
Searching...
No Matches
xiiGALResourceFormatDescription Struct Reference

This describes the invariant texture format attributes. These attributes are intrinsic to the texture format itself and do not depend on the format support. More...

#include <Descriptors.h>

Inheritance diagram for xiiGALResourceFormatDescription:
[legend]

Public Member Functions

 XII_DECLARE_POD_TYPE ()
XII_ALWAYS_INLINE bool IsCompressed () const
 Returns true if the format is block-compressed (BC, ETC, ASTC, etc.).
XII_ALWAYS_INLINE xiiUInt32 GetElementSize () const
 Returns the number of bytes per texel (non-compressed) or per block (compressed).
XII_ALWAYS_INLINE xiiUInt32 GetBitsPerPixel () const
 Returns the number of bits per texel (non-compressed) or per block (compressed).
XII_ALWAYS_INLINE xiiUInt32 GetBlockWidth () const
 Returns the width of a compression block (4 for BC formats).
XII_ALWAYS_INLINE xiiUInt32 GetBlockHeight () const
 Returns the height of a compression block (4 for BC formats).
XII_ALWAYS_INLINE xiiUInt32 GetBlockCountX (xiiUInt32 uiWidth) const
 Returns how many blocks are needed horizontally for a given width.
XII_ALWAYS_INLINE xiiUInt32 GetBlockCountY (xiiUInt32 uiHeight) const
 Returns how many blocks are needed vertically for a given height.
XII_ALWAYS_INLINE xiiUInt32 GetRowPitch (xiiUInt32 uiWidth) const
 Returns the number of bytes in one row of texels or blocks.
XII_ALWAYS_INLINE xiiUInt64 GetSlicePitch (xiiUInt32 uiWidth, xiiUInt32 uiHeight) const
 Returns the number of bytes in one 2D slice (height * rowPitch).
XII_ALWAYS_INLINE xiiUInt32 GetTexelsPerBlock () const
 Returns the number of texels per block (16 for BC1–BC5).
XII_ALWAYS_INLINE bool IsTypeless () const
 Returns true if the format is typeless.
XII_ALWAYS_INLINE bool IsNormalized () const
 Returns true if the format is UNorm or SNorm.
Public Member Functions inherited from xiiHashableStruct< xiiGALResourceFormatDescription >
constexpr xiiHashableStruct () noexcept
 Default constructor. Initializes all bytes to zero.
xiiHashableStruct & operator= (const xiiHashableStruct &other) noexcept
 Bitwise assignment operator.
bool operator== (const xiiHashableStruct &other) const noexcept
 Compares equality via raw byte comparison.
std::strong_ordering operator<=> (const xiiHashableStruct &other) const noexcept
 Compares ordering via raw byte comparison.
xiiUInt32 CalculateHash () const noexcept
 Calculates a 32-bit hash from raw bytes of the struct.
void Clear () noexcept
 Fills all bytes with zero.
bool IsZero () const noexcept
 Returns true if all bytes are zero.

Public Attributes

xiiEnum< xiiGALResourceFormat > m_Format = xiiGALResourceFormat::Unknown
 Texture format.
xiiUInt8 m_uiComponentSize = 0U
 The size of one component in bytes.
xiiUInt8 m_uiComponentCount = 0U
 The number of components.
xiiEnum< xiiGALResourceFormatComponentType > m_ComponentType = xiiGALResourceFormatComponentType::Undefined
 The component type.
bool m_bIsTypeless = false
 Indicates whether the format is a typeless format.
xiiUInt8 m_uiBlockWidth = 0U
 For block-compressed formats, the compression block width.
xiiUInt8 m_uiBlockHeight = 0U
 For block-compressed formats, the compression block height.

Detailed Description

This describes the invariant texture format attributes. These attributes are intrinsic to the texture format itself and do not depend on the format support.


The documentation for this struct was generated from the following file:
  • /home/runner/work/XII/XII/Source/Engine/GraphicsFoundation/Declarations/Descriptors.h