ReXGlue SDK
Loading...
Searching...
No Matches
rex::xenos::TextureExtent Struct Reference

Public Member Functions

u32 GetAllBlocks () const
u32 GetVisibleBlocks () const
bool operator== (const TextureExtent &other) const =default

Static Public Member Functions

static TextureExtent Calculate (const FormatInfo *format_info, u32 pitch, u32 height, u32 depth, bool is_tiled, bool is_guest)
static TextureExtent Calculate (const TextureInfo *texture_info, bool is_guest)

Public Attributes

u32 pitch
u32 height
u32 block_width
u32 block_height
u32 block_pitch_h
u32 block_pitch_v
u32 depth

Member Function Documentation

◆ Calculate() [1/2]

TextureExtent rex::xenos::TextureExtent::Calculate ( const FormatInfo * format_info,
u32 pitch,
u32 height,
u32 depth,
bool is_tiled,
bool is_guest )
static

Returns the extent of a texture level from its block layout and size.

Parameters
is_tiledTrue for a tiled texture, false for a linear one.
is_guestTrue to pad as guest memory does, false for a packed host layout.

◆ Calculate() [2/2]

TextureExtent rex::xenos::TextureExtent::Calculate ( const TextureInfo * texture_info,
bool is_guest )
static

Returns the extent of the base level of a texture.

Parameters
texture_infoThe texture, using its base level size.
is_guestTrue for the padded guest memory layout, false for a packed host layout.

◆ GetAllBlocks()

u32 rex::xenos::TextureExtent::GetAllBlocks ( ) const
inline

Returns the block count including padding in every dimension.

◆ GetVisibleBlocks()

u32 rex::xenos::TextureExtent::GetVisibleBlocks ( ) const
inline

Returns the block count including row padding but only the visible block rows.

Member Data Documentation

◆ block_height

u32 rex::xenos::TextureExtent::block_height

Visible block rows.

◆ block_pitch_h

u32 rex::xenos::TextureExtent::block_pitch_h

Blocks per row including padding.

◆ block_pitch_v

u32 rex::xenos::TextureExtent::block_pitch_v

Block rows including padding.

◆ block_width

u32 rex::xenos::TextureExtent::block_width

Visible blocks per row.

◆ height

u32 rex::xenos::TextureExtent::height

Height in texels, padded like the pitch.


The documentation for this struct was generated from the following file: