WUT  0.1
Wii U Toolchain
Data Structures | Typedefs | Enumerations | Functions
Surface

Data Structures

struct  GX2Surface
 
struct  GX2DepthBuffer
 
struct  GX2ColorBuffer
 

Typedefs

typedef enum GX2AAMode GX2AAMode
 
typedef enum GX2SurfaceUse GX2SurfaceUse
 
typedef enum GX2RResourceFlags GX2RResourceFlags
 
typedef enum GX2TileMode GX2TileMode
 

Enumerations

enum  GX2SurfaceDim {
  GX2_SURFACE_DIM_TEXTURE_1D = 0, GX2_SURFACE_DIM_TEXTURE_2D = 1, GX2_SURFACE_DIM_TEXTURE_3D = 2, GX2_SURFACE_DIM_TEXTURE_CUBE = 3,
  GX2_SURFACE_DIM_TEXTURE_1D_ARRAY = 4, GX2_SURFACE_DIM_TEXTURE_2D_ARRAY = 5, GX2_SURFACE_DIM_TEXTURE_2D_MSAA = 6, GX2_SURFACE_DIM_TEXTURE_2D_MSAA_ARRAY = 7
}
 
enum  GX2SurfaceFormat {
  GX2_SURFACE_FORMAT_INVALID = 0x00, GX2_SURFACE_FORMAT_UNORM_R4_G4 = 0x02, GX2_SURFACE_FORMAT_UNORM_R4_G4_B4_A4 = 0x0b, GX2_SURFACE_FORMAT_UNORM_R8 = 0x01,
  GX2_SURFACE_FORMAT_UNORM_R8_G8 = 0x07, GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8 = 0x01a, GX2_SURFACE_FORMAT_UNORM_R16 = 0x05, GX2_SURFACE_FORMAT_UNORM_R16_G16 = 0x0f,
  GX2_SURFACE_FORMAT_UNORM_R16_G16_B16_A16 = 0x01f, GX2_SURFACE_FORMAT_UNORM_R5_G6_B5 = 0x08, GX2_SURFACE_FORMAT_UNORM_R5_G5_B5_A1 = 0x0a, GX2_SURFACE_FORMAT_UNORM_A1_B5_G5_R5 = 0x0c,
  GX2_SURFACE_FORMAT_UNORM_R24_X8 = 0x011, GX2_SURFACE_FORMAT_UNORM_A2_B10_G10_R10 = 0x01b, GX2_SURFACE_FORMAT_UNORM_R10_G10_B10_A2 = 0x019, GX2_SURFACE_FORMAT_UNORM_BC1 = 0x031,
  GX2_SURFACE_FORMAT_UNORM_BC2 = 0x032, GX2_SURFACE_FORMAT_UNORM_BC3 = 0x033, GX2_SURFACE_FORMAT_UNORM_BC4 = 0x034, GX2_SURFACE_FORMAT_UNORM_BC5 = 0x035,
  GX2_SURFACE_FORMAT_UNORM_NV12 = 0x081, GX2_SURFACE_FORMAT_UINT_R8 = 0x101, GX2_SURFACE_FORMAT_UINT_R8_G8 = 0x107, GX2_SURFACE_FORMAT_UINT_R8_G8_B8_A8 = 0x11a,
  GX2_SURFACE_FORMAT_UINT_R16 = 0x105, GX2_SURFACE_FORMAT_UINT_R16_G16 = 0x10f, GX2_SURFACE_FORMAT_UINT_R16_G16_B16_A16 = 0x11f, GX2_SURFACE_FORMAT_UINT_R32 = 0x10d,
  GX2_SURFACE_FORMAT_UINT_R32_G32 = 0x11d, GX2_SURFACE_FORMAT_UINT_R32_G32_B32_A32 = 0x122, GX2_SURFACE_FORMAT_UINT_A2_B10_G10_R10 = 0x11b, GX2_SURFACE_FORMAT_UINT_R10_G10_B10_A2 = 0x119,
  GX2_SURFACE_FORMAT_UINT_X24_G8 = 0x111, GX2_SURFACE_FORMAT_UINT_G8_X24 = 0x11c, GX2_SURFACE_FORMAT_SNORM_R8 = 0x201, GX2_SURFACE_FORMAT_SNORM_R8_G8 = 0x207,
  GX2_SURFACE_FORMAT_SNORM_R8_G8_B8_A8 = 0x21a, GX2_SURFACE_FORMAT_SNORM_R16 = 0x205, GX2_SURFACE_FORMAT_SNORM_R16_G16 = 0x20f, GX2_SURFACE_FORMAT_SNORM_R16_G16_B16_A16 = 0x21f,
  GX2_SURFACE_FORMAT_SNORM_R10_G10_B10_A2 = 0x219, GX2_SURFACE_FORMAT_SNORM_BC4 = 0x234, GX2_SURFACE_FORMAT_SNORM_BC5 = 0x235, GX2_SURFACE_FORMAT_SINT_R8 = 0x301,
  GX2_SURFACE_FORMAT_SINT_R8_G8 = 0x307, GX2_SURFACE_FORMAT_SINT_R8_G8_B8_A8 = 0x31a, GX2_SURFACE_FORMAT_SINT_R16 = 0x305, GX2_SURFACE_FORMAT_SINT_R16_G16 = 0x30f,
  GX2_SURFACE_FORMAT_SINT_R16_G16_B16_A16 = 0x31f, GX2_SURFACE_FORMAT_SINT_R32 = 0x30d, GX2_SURFACE_FORMAT_SINT_R32_G32 = 0x31d, GX2_SURFACE_FORMAT_SINT_R32_G32_B32_A32 = 0x322,
  GX2_SURFACE_FORMAT_SINT_R10_G10_B10_A2 = 0x319, GX2_SURFACE_FORMAT_SRGB_R8_G8_B8_A8 = 0x41a, GX2_SURFACE_FORMAT_SRGB_BC1 = 0x431, GX2_SURFACE_FORMAT_SRGB_BC2 = 0x432,
  GX2_SURFACE_FORMAT_SRGB_BC3 = 0x433, GX2_SURFACE_FORMAT_FLOAT_R32 = 0x80e, GX2_SURFACE_FORMAT_FLOAT_R32_G32 = 0x81e, GX2_SURFACE_FORMAT_FLOAT_R32_G32_B32_A32 = 0x823,
  GX2_SURFACE_FORMAT_FLOAT_R16 = 0x806, GX2_SURFACE_FORMAT_FLOAT_R16_G16 = 0x810, GX2_SURFACE_FORMAT_FLOAT_R16_G16_B16_A16 = 0x820, GX2_SURFACE_FORMAT_FLOAT_R11_G11_B10 = 0x816,
  GX2_SURFACE_FORMAT_FLOAT_D24_S8 = 0x811, GX2_SURFACE_FORMAT_FLOAT_X8_X24 = 0x81c
}
 
enum  GX2AAMode { GX2_AA_MODE1X = 0 }
 
enum  GX2SurfaceUse { GX2_SURFACE_USE_TEXTURE = 1 << 0, GX2_SURFACE_USE_COLOR_BUFFER = 1 << 1, GX2_SURFACE_USE_DEPTH_BUFFER = 1 << 2, GX2_SURFACE_USE_SCAN_BUFFER = 1 << 3 }
 
enum  GX2RResourceFlags {
  GX2R_RESOURCE_FLAGS_BIND_TEXTURE = 1 << 0, GX2R_RESOURCE_FLAGS_BIND_COLOR_BUFFER = 1 << 1, GX2R_RESOURCE_FLAGS_BIND_DEPTH_BUFFER = 1 << 2, GX2R_RESOURCE_FLAGS_BIND_SCAN_BUFFER = 1 << 3,
  GX2R_RESOURCE_FLAGS_BIND_VERTEX_BUFFER = 1 << 4, GX2R_RESOURCE_FLAGS_BIND_INDEX_BUFFER = 1 << 5, GX2R_RESOURCE_FLAGS_BIND_UNIFORM_BLOCK = 1 << 6, GX2R_RESOURCE_FLAGS_BIND_SHADER_PROGRAM = 1 << 7,
  GX2R_RESOURCE_FLAGS_BIND_STREAM_OUTPUT = 1 << 8, GX2R_RESOURCE_FLAGS_BIND_DISPLAY_LIST = 1 << 9, GX2R_RESOURCE_FLAGS_BIND_GS_RING = 1 << 10, GX2R_RESOURCE_FLAGS_USAGE_CPU_READ = 1 << 11,
  GX2R_RESOURCE_FLAGS_USAGE_CPU_WRITE = 1 << 12, GX2R_RESOURCE_FLAGS_USAGE_GPU_READ = 1 << 13, GX2R_RESOURCE_FLAGS_USAGE_GPU_WRITE = 1 << 14, GX2R_RESOURCE_FLAGS_USAGE_DMA_READ = 1 << 15,
  GX2R_RESOURCE_FLAGS_USAGE_DMA_WRITE = 1 << 16, GX2R_RESOURCE_FLAGS_USAGE_FORCE_MEM1 = 1 << 17, GX2R_RESOURCE_FLAGS_USAGE_FORCE_MEM2 = 1 << 18, GX2R_RESOURCE_FLAGS_USER_MEMORY = 1 << 29,
  GX2R_RESOURCE_FLAGS_LOCKED = 1 << 30
}
 
enum  GX2TileMode {
  GX2_TILE_MODE_DEFAULT = 0, GX2_TILE_MODE_LINEAR_ALIGNED = 1, GX2_TILE_MODE_TILED_1D_THIN1 = 2, GX2_TILE_MODE_TILED_1D_THICK = 3,
  GX2_TILE_MODE_TILED_2D_THIN1 = 4, GX2_TILE_MODE_TILED_2D_THIN2 = 5, GX2_TILE_MODE_TILED_2D_THIN4 = 6, GX2_TILE_MODE_TILED_2D_THICK = 7,
  GX2_TILE_MODE_TILED_2B_THIN1 = 8, GX2_TILE_MODE_TILED_2B_THIN2 = 9, GX2_TILE_MODE_TILED_2B_THIN4 = 10, GX2_TILE_MODE_TILED_2B_THICK = 11,
  GX2_TILE_MODE_TILED_3D_THIN1 = 12, GX2_TILE_MODE_TILED_3D_THICK = 13, GX2_TILE_MODE_TILED_3B_THIN1 = 14, GX2_TILE_MODE_TILED_3B_THICK = 15,
  GX2_TILE_MODE_LINEAR_SPECIAL = 16
}
 

Functions

void GX2CalcSurfaceSizeAndAlignment (GX2Surface *surface)
 
void GX2CalcDepthBufferHiZInfo (GX2DepthBuffer *depthBuffer, uint32_t *outSize, uint32_t *outAlignment)
 
void GX2SetColorBuffer (GX2ColorBuffer *colorBuffer, GX2RenderTarget target)
 
void GX2SetDepthBuffer (GX2DepthBuffer *depthBuffer)
 
void GX2InitColorBufferRegs (GX2ColorBuffer *colorBuffer)
 
void GX2InitDepthBufferRegs (GX2DepthBuffer *depthBuffer)
 
void GX2InitDepthBufferHiZEnable (GX2DepthBuffer *depthBuffer, BOOL enable)
 
uint32_t GX2GetSurfaceSwizzle (GX2Surface *surface)
 
void GX2SetSurfaceSwizzle (GX2Surface *surface, uint32_t swizzle)
 
void GX2CopySurface (GX2Surface *src, uint32_t srcLevel, uint32_t srcDepth, GX2Surface *dst, uint32_t dstLevel, uint32_t dstDepth)
 

Detailed Description

Typedef Documentation

typedef enum GX2AAMode GX2AAMode
typedef enum GX2TileMode GX2TileMode

Enumeration Type Documentation

enum GX2AAMode
Enumerator
GX2_AA_MODE1X 

Definition at line 101 of file surface.h.

Enumerator
GX2R_RESOURCE_FLAGS_BIND_TEXTURE 
GX2R_RESOURCE_FLAGS_BIND_COLOR_BUFFER 
GX2R_RESOURCE_FLAGS_BIND_DEPTH_BUFFER 
GX2R_RESOURCE_FLAGS_BIND_SCAN_BUFFER 
GX2R_RESOURCE_FLAGS_BIND_VERTEX_BUFFER 
GX2R_RESOURCE_FLAGS_BIND_INDEX_BUFFER 
GX2R_RESOURCE_FLAGS_BIND_UNIFORM_BLOCK 
GX2R_RESOURCE_FLAGS_BIND_SHADER_PROGRAM 
GX2R_RESOURCE_FLAGS_BIND_STREAM_OUTPUT 
GX2R_RESOURCE_FLAGS_BIND_DISPLAY_LIST 
GX2R_RESOURCE_FLAGS_BIND_GS_RING 
GX2R_RESOURCE_FLAGS_USAGE_CPU_READ 
GX2R_RESOURCE_FLAGS_USAGE_CPU_WRITE 
GX2R_RESOURCE_FLAGS_USAGE_GPU_READ 
GX2R_RESOURCE_FLAGS_USAGE_GPU_WRITE 
GX2R_RESOURCE_FLAGS_USAGE_DMA_READ 
GX2R_RESOURCE_FLAGS_USAGE_DMA_WRITE 
GX2R_RESOURCE_FLAGS_USAGE_FORCE_MEM1 
GX2R_RESOURCE_FLAGS_USAGE_FORCE_MEM2 
GX2R_RESOURCE_FLAGS_USER_MEMORY 
GX2R_RESOURCE_FLAGS_LOCKED 

Definition at line 114 of file surface.h.

Enumerator
GX2_SURFACE_DIM_TEXTURE_1D 
GX2_SURFACE_DIM_TEXTURE_2D 
GX2_SURFACE_DIM_TEXTURE_3D 
GX2_SURFACE_DIM_TEXTURE_CUBE 
GX2_SURFACE_DIM_TEXTURE_1D_ARRAY 
GX2_SURFACE_DIM_TEXTURE_2D_ARRAY 
GX2_SURFACE_DIM_TEXTURE_2D_MSAA 
GX2_SURFACE_DIM_TEXTURE_2D_MSAA_ARRAY 

Definition at line 14 of file surface.h.

Enumerator
GX2_SURFACE_FORMAT_INVALID 
GX2_SURFACE_FORMAT_UNORM_R4_G4 
GX2_SURFACE_FORMAT_UNORM_R4_G4_B4_A4 
GX2_SURFACE_FORMAT_UNORM_R8 
GX2_SURFACE_FORMAT_UNORM_R8_G8 
GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8 
GX2_SURFACE_FORMAT_UNORM_R16 
GX2_SURFACE_FORMAT_UNORM_R16_G16 
GX2_SURFACE_FORMAT_UNORM_R16_G16_B16_A16 
GX2_SURFACE_FORMAT_UNORM_R5_G6_B5 
GX2_SURFACE_FORMAT_UNORM_R5_G5_B5_A1 
GX2_SURFACE_FORMAT_UNORM_A1_B5_G5_R5 
GX2_SURFACE_FORMAT_UNORM_R24_X8 
GX2_SURFACE_FORMAT_UNORM_A2_B10_G10_R10 
GX2_SURFACE_FORMAT_UNORM_R10_G10_B10_A2 
GX2_SURFACE_FORMAT_UNORM_BC1 
GX2_SURFACE_FORMAT_UNORM_BC2 
GX2_SURFACE_FORMAT_UNORM_BC3 
GX2_SURFACE_FORMAT_UNORM_BC4 
GX2_SURFACE_FORMAT_UNORM_BC5 
GX2_SURFACE_FORMAT_UNORM_NV12 
GX2_SURFACE_FORMAT_UINT_R8 
GX2_SURFACE_FORMAT_UINT_R8_G8 
GX2_SURFACE_FORMAT_UINT_R8_G8_B8_A8 
GX2_SURFACE_FORMAT_UINT_R16 
GX2_SURFACE_FORMAT_UINT_R16_G16 
GX2_SURFACE_FORMAT_UINT_R16_G16_B16_A16 
GX2_SURFACE_FORMAT_UINT_R32 
GX2_SURFACE_FORMAT_UINT_R32_G32 
GX2_SURFACE_FORMAT_UINT_R32_G32_B32_A32 
GX2_SURFACE_FORMAT_UINT_A2_B10_G10_R10 
GX2_SURFACE_FORMAT_UINT_R10_G10_B10_A2 
GX2_SURFACE_FORMAT_UINT_X24_G8 
GX2_SURFACE_FORMAT_UINT_G8_X24 
GX2_SURFACE_FORMAT_SNORM_R8 
GX2_SURFACE_FORMAT_SNORM_R8_G8 
GX2_SURFACE_FORMAT_SNORM_R8_G8_B8_A8 
GX2_SURFACE_FORMAT_SNORM_R16 
GX2_SURFACE_FORMAT_SNORM_R16_G16 
GX2_SURFACE_FORMAT_SNORM_R16_G16_B16_A16 
GX2_SURFACE_FORMAT_SNORM_R10_G10_B10_A2 
GX2_SURFACE_FORMAT_SNORM_BC4 
GX2_SURFACE_FORMAT_SNORM_BC5 
GX2_SURFACE_FORMAT_SINT_R8 
GX2_SURFACE_FORMAT_SINT_R8_G8 
GX2_SURFACE_FORMAT_SINT_R8_G8_B8_A8 
GX2_SURFACE_FORMAT_SINT_R16 
GX2_SURFACE_FORMAT_SINT_R16_G16 
GX2_SURFACE_FORMAT_SINT_R16_G16_B16_A16 
GX2_SURFACE_FORMAT_SINT_R32 
GX2_SURFACE_FORMAT_SINT_R32_G32 
GX2_SURFACE_FORMAT_SINT_R32_G32_B32_A32 
GX2_SURFACE_FORMAT_SINT_R10_G10_B10_A2 
GX2_SURFACE_FORMAT_SRGB_R8_G8_B8_A8 
GX2_SURFACE_FORMAT_SRGB_BC1 
GX2_SURFACE_FORMAT_SRGB_BC2 
GX2_SURFACE_FORMAT_SRGB_BC3 
GX2_SURFACE_FORMAT_FLOAT_R32 
GX2_SURFACE_FORMAT_FLOAT_R32_G32 
GX2_SURFACE_FORMAT_FLOAT_R32_G32_B32_A32 
GX2_SURFACE_FORMAT_FLOAT_R16 
GX2_SURFACE_FORMAT_FLOAT_R16_G16 
GX2_SURFACE_FORMAT_FLOAT_R16_G16_B16_A16 
GX2_SURFACE_FORMAT_FLOAT_R11_G11_B10 
GX2_SURFACE_FORMAT_FLOAT_D24_S8 
GX2_SURFACE_FORMAT_FLOAT_X8_X24 

Definition at line 26 of file surface.h.

Enumerator
GX2_SURFACE_USE_TEXTURE 
GX2_SURFACE_USE_COLOR_BUFFER 
GX2_SURFACE_USE_DEPTH_BUFFER 
GX2_SURFACE_USE_SCAN_BUFFER 

Definition at line 106 of file surface.h.

Enumerator
GX2_TILE_MODE_DEFAULT 
GX2_TILE_MODE_LINEAR_ALIGNED 
GX2_TILE_MODE_TILED_1D_THIN1 
GX2_TILE_MODE_TILED_1D_THICK 
GX2_TILE_MODE_TILED_2D_THIN1 
GX2_TILE_MODE_TILED_2D_THIN2 
GX2_TILE_MODE_TILED_2D_THIN4 
GX2_TILE_MODE_TILED_2D_THICK 
GX2_TILE_MODE_TILED_2B_THIN1 
GX2_TILE_MODE_TILED_2B_THIN2 
GX2_TILE_MODE_TILED_2B_THIN4 
GX2_TILE_MODE_TILED_2B_THICK 
GX2_TILE_MODE_TILED_3D_THIN1 
GX2_TILE_MODE_TILED_3D_THICK 
GX2_TILE_MODE_TILED_3B_THIN1 
GX2_TILE_MODE_TILED_3B_THICK 
GX2_TILE_MODE_LINEAR_SPECIAL 

Definition at line 139 of file surface.h.

Function Documentation

void GX2CalcDepthBufferHiZInfo ( GX2DepthBuffer depthBuffer,
uint32_t *  outSize,
uint32_t *  outAlignment 
)
void GX2CalcSurfaceSizeAndAlignment ( GX2Surface surface)
void GX2CopySurface ( GX2Surface src,
uint32_t  srcLevel,
uint32_t  srcDepth,
GX2Surface dst,
uint32_t  dstLevel,
uint32_t  dstDepth 
)
uint32_t GX2GetSurfaceSwizzle ( GX2Surface surface)
void GX2InitColorBufferRegs ( GX2ColorBuffer colorBuffer)
void GX2InitDepthBufferHiZEnable ( GX2DepthBuffer depthBuffer,
BOOL  enable 
)
void GX2InitDepthBufferRegs ( GX2DepthBuffer depthBuffer)
void GX2SetColorBuffer ( GX2ColorBuffer colorBuffer,
GX2RenderTarget  target 
)
void GX2SetDepthBuffer ( GX2DepthBuffer depthBuffer)
void GX2SetSurfaceSwizzle ( GX2Surface surface,
uint32_t  swizzle 
)