|
ReXGlue SDK
|
#include <rex/xenos/texture.h>
Public Member Functions | |
| const FormatInfo * | GetFormatInfo () const |
| bool | IsCompressed () const |
| u32 | GetMipLevels () const |
| u32 | GetMaxMipLevels () const |
| const TextureExtent | GetMipExtent (u32 mip, bool is_guest) const |
| void | GetMipSize (u32 mip, u32 *width, u32 *height) const |
| u32 | GetMipLocation (u32 mip, u32 *offset_x, u32 *offset_y, bool is_guest) const |
| bool | GetPackedMipOffset (u32 packed_tile, u32 *offset_x, u32 *offset_y) const |
| u64 | Hash () const |
| bool | operator== (const TextureInfo &other) const =default |
Static Public Member Functions | |
| static bool | FromFetchConstant (const xenos::TextureFetch &fetch, TextureInfo *out_info) |
| static bool | FromResolve (u32 physical_address, xenos::TextureFormat texture_format, xenos::Endian endian, u32 pitch, u32 width, u32 height, u32 depth, TextureInfo *out_info) |
| static bool | GetPackedMipOffset (u32 width, u32 height, const FormatInfo *format_info, u32 packed_tile, u32 *offset_x, u32 *offset_y) |
Public Attributes | |
| xenos::TextureFormat | format |
| xenos::Endian | endianness |
| xenos::DataDimension | dimension |
| u32 | width_minus_1 |
| u32 | height_minus_1 |
| u32 | depth_or_array_size_minus_1 |
| u32 | pitch |
| u32 | mip_min_level |
| u32 | mip_max_level |
| bool | is_stacked |
| bool | is_tiled |
| bool | has_packed_mips |
| TextureMemoryRanges | memory |
| TextureExtent | extent |
Texture description decoded from a fetch constant or a resolve.
|
static |
Decodes a texture description from a texture fetch constant.
| out_info | Receives the texture description. |
|
static |
Fills the texture info of a tiled 2D resolve destination with a single level.
| endian | Swap mode of the texel data. |
| width | Width in texels, at least 1. |
| height | Height in texels, at least 1. |
| out_info | Receives the texture description. |
| u32 rex::xenos::TextureInfo::GetMaxMipLevels | ( | ) | const |
Returns the mip level count of a full chain for the texture size.
| const TextureExtent rex::xenos::TextureInfo::GetMipExtent | ( | u32 | mip, |
| bool | is_guest ) const |
Returns the extent of a mip level.
| is_guest | True for the padded guest layout with power of 2 mip sizes, false for packed. |
| u32 rex::xenos::TextureInfo::GetMipLocation | ( | u32 | mip, |
| u32 * | offset_x, | ||
| u32 * | offset_y, | ||
| bool | is_guest ) const |
Returns the guest address of a mip level and its offset within a packed tile, or 0 when the texture has no mip data.
| offset_x | Receives the X offset in blocks within a packed tile. |
| offset_y | Receives the Y offset in blocks within a packed tile. |
| is_guest | True for the padded guest memory layout, false for a packed host layout. |
| void rex::xenos::TextureInfo::GetMipSize | ( | u32 | mip, |
| u32 * | width, | ||
| u32 * | height ) const |
Computes the size of a mip level in texels.
| width | Receives the width in texels, rounded to a power of 2 for levels above 0. |
| height | Receives the height in texels, rounded to a power of 2 for levels above 0. |
| bool rex::xenos::TextureInfo::GetPackedMipOffset | ( | u32 | packed_tile, |
| u32 * | offset_x, | ||
| u32 * | offset_y ) const |
Computes the block offset of a level of this texture within its packed tile.
| packed_tile | Index of the level within the packed tile. |
| offset_x | Receives the X offset in blocks. |
| offset_y | Receives the Y offset in blocks. |
|
static |
Computes the block offset of a level within a packed tile.
| width | Width of the packed level set in texels. |
| height | Height of the packed level set in texels. |
| packed_tile | Index of the level within the packed tile. |
| offset_x | Receives the X offset in blocks. |
| offset_y | Receives the Y offset in blocks. |
| u64 rex::xenos::TextureInfo::Hash | ( | ) | const |
Returns the 64 bit XXH3 hash of every field.
| xenos::DataDimension rex::xenos::TextureInfo::dimension |
Dimension, with 1D stored as 2D.
| TextureExtent rex::xenos::TextureInfo::extent |
Base level extent in the guest layout.
| bool rex::xenos::TextureInfo::has_packed_mips |
True when small mips share a packed tile.
| bool rex::xenos::TextureInfo::is_stacked |
True for a 2D array.