wut  v1.7.0
Wii U Toolchain
Data Structures | Typedefs | Functions
Shaders
Collaboration diagram for Shaders:

Data Structures

struct  GX2FetchShader
 
struct  GX2UniformBlock
 
struct  GX2UniformVar
 
struct  GX2UniformInitialValue
 
struct  GX2LoopVar
 
struct  GX2SamplerVar
 
struct  GX2AttribVar
 
struct  GX2VertexShader
 
struct  GX2PixelShader
 
struct  GX2GeometryShader
 
struct  GX2AttribStream
 
struct  GX2FetchShader.regs
 
struct  GX2VertexShader.regs
 
struct  GX2PixelShader.regs
 
struct  GX2GeometryShader.regs
 

Typedefs

typedef struct GX2AttribVar GX2AttribVar
 
typedef struct GX2AttribStream GX2AttribStream
 
typedef struct GX2FetchShader GX2FetchShader
 
typedef struct GX2GeometryShader GX2GeometryShader
 
typedef struct GX2LoopVar GX2LoopVar
 
typedef struct GX2PixelShader GX2PixelShader
 
typedef struct GX2SamplerVar GX2SamplerVar
 
typedef struct GX2UniformBlock GX2UniformBlock
 
typedef struct GX2UniformVar GX2UniformVar
 
typedef struct GX2UniformInitialValue GX2UniformInitialValue
 
typedef struct GX2VertexShader GX2VertexShader
 

Functions

uint32_t GX2CalcGeometryShaderInputRingBufferSize (uint32_t ringItemSize)
 
uint32_t GX2CalcGeometryShaderOutputRingBufferSize (uint32_t ringItemSize)
 
uint32_t GX2CalcFetchShaderSizeEx (uint32_t attribs, GX2FetchShaderType fetchShaderType, GX2TessellationMode tesellationMode)
 
void GX2InitFetchShaderEx (GX2FetchShader *fetchShader, uint8_t *buffer, uint32_t attribCount, const GX2AttribStream *attribs, GX2FetchShaderType type, GX2TessellationMode tessMode)
 
void GX2SetFetchShader (const GX2FetchShader *shader)
 
void GX2SetVertexShader (const GX2VertexShader *shader)
 
void GX2SetPixelShader (const GX2PixelShader *shader)
 
void GX2SetGeometryShader (const GX2GeometryShader *shader)
 
void GX2SetVertexSampler (const GX2Sampler *sampler, uint32_t id)
 
void GX2SetPixelSampler (const GX2Sampler *sampler, uint32_t id)
 
void GX2SetGeometrySampler (const GX2Sampler *sampler, uint32_t id)
 
void GX2SetVertexUniformReg (uint32_t offset, uint32_t count, const void *data)
 
void GX2SetPixelUniformReg (uint32_t offset, uint32_t count, const void *data)
 
void GX2SetVertexUniformBlock (uint32_t location, uint32_t size, const void *data)
 
void GX2SetPixelUniformBlock (uint32_t location, uint32_t size, const void *data)
 
void GX2SetGeometryUniformBlock (uint32_t location, uint32_t size, const void *data)
 
void GX2SetShaderModeEx (GX2ShaderMode mode, uint32_t numVsGpr, uint32_t numVsStackEntries, uint32_t numGsGpr, uint32_t numGsStackEntries, uint32_t numPsGpr, uint32_t numPsStackEntries)
 
void GX2SetStreamOutEnable (BOOL enable)
 
void GX2SetGeometryShaderInputRingBuffer (const void *buffer, uint32_t size)
 
void GX2SetGeometryShaderOutputRingBuffer (void *buffer, uint32_t size)
 
uint32_t GX2GetPixelShaderGPRs (const GX2PixelShader *shader)
 
uint32_t GX2GetPixelShaderStackEntries (const GX2PixelShader *shader)
 
uint32_t GX2GetVertexShaderGPRs (const GX2VertexShader *shader)
 
uint32_t GX2GetVertexShaderStackEntries (const GX2VertexShader *shader)
 
uint32_t GX2GetGeometryShaderGPRs (const GX2GeometryShader *shader)
 
uint32_t GX2GetGeometryShaderStackEntries (const GX2GeometryShader *shader)
 
static GX2UniformBlockGX2GetGeometryUniformBlock (const GX2GeometryShader *shader, const char *name)
 
static GX2UniformBlockGX2GetPixelUniformBlock (const GX2PixelShader *shader, const char *name)
 
static GX2UniformBlockGX2GetVertexUniformBlock (const GX2VertexShader *shader, const char *name)
 
static GX2UniformVarGX2GetGeometryUniformVar (const GX2GeometryShader *shader, const char *name)
 
static GX2UniformVarGX2GetPixelUniformVar (const GX2PixelShader *shader, const char *name)
 
static GX2UniformVarGX2GetVertexUniformVar (const GX2VertexShader *shader, const char *name)
 
static void GX2SetShaderMode (GX2ShaderMode mode)
 

Detailed Description


Data Structure Documentation

◆ GX2FetchShader

struct GX2FetchShader

Definition at line 30 of file shaders.h.

Data Fields
GX2FetchShaderType type
struct GX2FetchShader regs
uint32_t size
void * program
uint32_t attribCount
uint32_t numDivisors
uint32_t divisors[2]

◆ GX2UniformBlock

struct GX2UniformBlock

Definition at line 54 of file shaders.h.

Data Fields
const char * name
uint32_t offset
uint32_t size

◆ GX2UniformVar

struct GX2UniformVar

Definition at line 65 of file shaders.h.

Data Fields
const char * name
GX2ShaderVarType type
uint32_t count
uint32_t offset
int32_t block

◆ GX2UniformInitialValue

struct GX2UniformInitialValue

Definition at line 80 of file shaders.h.

Data Fields
float value[4]
uint32_t offset

◆ GX2LoopVar

struct GX2LoopVar

Definition at line 89 of file shaders.h.

Data Fields
uint32_t offset
uint32_t value

◆ GX2SamplerVar

struct GX2SamplerVar

Definition at line 98 of file shaders.h.

Data Fields
const char * name
GX2SamplerVarType type
uint32_t location

◆ GX2AttribVar

struct GX2AttribVar

Definition at line 109 of file shaders.h.

Data Fields
const char * name
GX2ShaderVarType type
uint32_t count
uint32_t location

◆ GX2VertexShader

struct GX2VertexShader

Definition at line 122 of file shaders.h.

Data Fields
struct GX2VertexShader regs
uint32_t size
void * program
GX2ShaderMode mode
uint32_t uniformBlockCount
GX2UniformBlock * uniformBlocks
uint32_t uniformVarCount
GX2UniformVar * uniformVars
uint32_t initialValueCount
GX2UniformInitialValue * initialValues
uint32_t loopVarCount
GX2LoopVar * loopVars
uint32_t samplerVarCount
GX2SamplerVar * samplerVars
uint32_t attribVarCount
GX2AttribVar * attribVars
uint32_t ringItemsize
BOOL hasStreamOut
uint32_t streamOutStride[4]
GX2RBuffer gx2rBuffer

◆ GX2PixelShader

struct GX2PixelShader

Definition at line 202 of file shaders.h.

Data Fields
struct GX2PixelShader regs
uint32_t size
void * program
GX2ShaderMode mode
uint32_t uniformBlockCount
GX2UniformBlock * uniformBlocks
uint32_t uniformVarCount
GX2UniformVar * uniformVars
uint32_t initialValueCount
GX2UniformInitialValue * initialValues
uint32_t loopVarCount
GX2LoopVar * loopVars
uint32_t samplerVarCount
GX2SamplerVar * samplerVars
GX2RBuffer gx2rBuffer

◆ GX2GeometryShader

struct GX2GeometryShader

Definition at line 265 of file shaders.h.

Data Fields
struct GX2GeometryShader regs
uint32_t size
void * program
uint32_t vertexProgramSize
void * vertexProgram
GX2ShaderMode mode
uint32_t uniformBlockCount
GX2UniformBlock * uniformBlocks
uint32_t uniformVarCount
GX2UniformVar * uniformVars
uint32_t initialValueCount
GX2UniformInitialValue * initialValues
uint32_t loopVarCount
GX2LoopVar * loopVars
uint32_t samplerVarCount
GX2SamplerVar * samplerVars
uint32_t ringItemSize
BOOL hasStreamOut
uint32_t streamOutStride[4]
GX2RBuffer gx2rBuffer

◆ GX2AttribStream

struct GX2AttribStream

Definition at line 339 of file shaders.h.

Data Fields
uint32_t location
uint32_t buffer
uint32_t offset
GX2AttribFormat format
GX2AttribIndexType type
uint32_t aluDivisor
uint32_t mask
GX2EndianSwapMode endianSwap

◆ GX2FetchShader.regs

struct GX2FetchShader.regs

Definition at line 34 of file shaders.h.

Data Fields
uint32_t sq_pgm_resources_fs

◆ GX2VertexShader.regs

struct GX2VertexShader.regs

Definition at line 124 of file shaders.h.

Data Fields
uint32_t sq_pgm_resources_vs
uint32_t vgt_primitiveid_en
uint32_t spi_vs_out_config
uint32_t num_spi_vs_out_id
uint32_t spi_vs_out_id[10]
uint32_t pa_cl_vs_out_cntl
uint32_t sq_vtx_semantic_clear
uint32_t num_sq_vtx_semantic
uint32_t sq_vtx_semantic[32]
uint32_t vgt_strmout_buffer_en
uint32_t vgt_vertex_reuse_block_cntl
uint32_t vgt_hos_reuse_depth

◆ GX2PixelShader.regs

struct GX2PixelShader.regs

Definition at line 204 of file shaders.h.

Data Fields
uint32_t sq_pgm_resources_ps
uint32_t sq_pgm_exports_ps
uint32_t spi_ps_in_control_0
uint32_t spi_ps_in_control_1
uint32_t num_spi_ps_input_cntl
uint32_t spi_ps_input_cntls[32]
uint32_t cb_shader_mask
uint32_t cb_shader_control
uint32_t db_shader_control
uint32_t spi_input_z

◆ GX2GeometryShader.regs

struct GX2GeometryShader.regs

Definition at line 267 of file shaders.h.

Data Fields
uint32_t sq_pgm_resources_gs
uint32_t vgt_gs_out_prim_type
uint32_t vgt_gs_mode
uint32_t pa_cl_vs_out_cntl
uint32_t sq_pgm_resources_vs
uint32_t sq_gs_vert_itemsize
uint32_t spi_vs_out_config
uint32_t num_spi_vs_out_id
uint32_t spi_vs_out_id[10]
uint32_t vgt_strmout_buffer_en

Typedef Documentation

◆ GX2AttribVar

typedef struct GX2AttribVar GX2AttribVar

Definition at line 1 of file shaders.h.

◆ GX2AttribStream

Definition at line 1 of file shaders.h.

◆ GX2FetchShader

Definition at line 1 of file shaders.h.

◆ GX2GeometryShader

Definition at line 1 of file shaders.h.

◆ GX2LoopVar

typedef struct GX2LoopVar GX2LoopVar

Definition at line 1 of file shaders.h.

◆ GX2PixelShader

Definition at line 1 of file shaders.h.

◆ GX2SamplerVar

typedef struct GX2SamplerVar GX2SamplerVar

Definition at line 1 of file shaders.h.

◆ GX2UniformBlock

Definition at line 1 of file shaders.h.

◆ GX2UniformVar

typedef struct GX2UniformVar GX2UniformVar

Definition at line 1 of file shaders.h.

◆ GX2UniformInitialValue

Definition at line 1 of file shaders.h.

◆ GX2VertexShader

Definition at line 1 of file shaders.h.

Function Documentation

◆ GX2CalcGeometryShaderInputRingBufferSize()

uint32_t GX2CalcGeometryShaderInputRingBufferSize ( uint32_t  ringItemSize)

◆ GX2CalcGeometryShaderOutputRingBufferSize()

uint32_t GX2CalcGeometryShaderOutputRingBufferSize ( uint32_t  ringItemSize)

◆ GX2CalcFetchShaderSizeEx()

uint32_t GX2CalcFetchShaderSizeEx ( uint32_t  attribs,
GX2FetchShaderType  fetchShaderType,
GX2TessellationMode  tesellationMode 
)

◆ GX2InitFetchShaderEx()

void GX2InitFetchShaderEx ( GX2FetchShader fetchShader,
uint8_t *  buffer,
uint32_t  attribCount,
const GX2AttribStream attribs,
GX2FetchShaderType  type,
GX2TessellationMode  tessMode 
)

◆ GX2SetFetchShader()

void GX2SetFetchShader ( const GX2FetchShader shader)

◆ GX2SetVertexShader()

void GX2SetVertexShader ( const GX2VertexShader shader)

◆ GX2SetPixelShader()

void GX2SetPixelShader ( const GX2PixelShader shader)

◆ GX2SetGeometryShader()

void GX2SetGeometryShader ( const GX2GeometryShader shader)

◆ GX2SetVertexSampler()

void GX2SetVertexSampler ( const GX2Sampler sampler,
uint32_t  id 
)

◆ GX2SetPixelSampler()

void GX2SetPixelSampler ( const GX2Sampler sampler,
uint32_t  id 
)

◆ GX2SetGeometrySampler()

void GX2SetGeometrySampler ( const GX2Sampler sampler,
uint32_t  id 
)

◆ GX2SetVertexUniformReg()

void GX2SetVertexUniformReg ( uint32_t  offset,
uint32_t  count,
const void *  data 
)

◆ GX2SetPixelUniformReg()

void GX2SetPixelUniformReg ( uint32_t  offset,
uint32_t  count,
const void *  data 
)

◆ GX2SetVertexUniformBlock()

void GX2SetVertexUniformBlock ( uint32_t  location,
uint32_t  size,
const void *  data 
)

◆ GX2SetPixelUniformBlock()

void GX2SetPixelUniformBlock ( uint32_t  location,
uint32_t  size,
const void *  data 
)

◆ GX2SetGeometryUniformBlock()

void GX2SetGeometryUniformBlock ( uint32_t  location,
uint32_t  size,
const void *  data 
)

◆ GX2SetShaderModeEx()

void GX2SetShaderModeEx ( GX2ShaderMode  mode,
uint32_t  numVsGpr,
uint32_t  numVsStackEntries,
uint32_t  numGsGpr,
uint32_t  numGsStackEntries,
uint32_t  numPsGpr,
uint32_t  numPsStackEntries 
)

◆ GX2SetStreamOutEnable()

void GX2SetStreamOutEnable ( BOOL  enable)

◆ GX2SetGeometryShaderInputRingBuffer()

void GX2SetGeometryShaderInputRingBuffer ( const void *  buffer,
uint32_t  size 
)

◆ GX2SetGeometryShaderOutputRingBuffer()

void GX2SetGeometryShaderOutputRingBuffer ( void *  buffer,
uint32_t  size 
)

◆ GX2GetPixelShaderGPRs()

uint32_t GX2GetPixelShaderGPRs ( const GX2PixelShader shader)

◆ GX2GetPixelShaderStackEntries()

uint32_t GX2GetPixelShaderStackEntries ( const GX2PixelShader shader)

◆ GX2GetVertexShaderGPRs()

uint32_t GX2GetVertexShaderGPRs ( const GX2VertexShader shader)

◆ GX2GetVertexShaderStackEntries()

uint32_t GX2GetVertexShaderStackEntries ( const GX2VertexShader shader)

◆ GX2GetGeometryShaderGPRs()

uint32_t GX2GetGeometryShaderGPRs ( const GX2GeometryShader shader)

◆ GX2GetGeometryShaderStackEntries()

uint32_t GX2GetGeometryShaderStackEntries ( const GX2GeometryShader shader)

◆ GX2GetGeometryUniformBlock()

static GX2UniformBlock* GX2GetGeometryUniformBlock ( const GX2GeometryShader shader,
const char *  name 
)
inlinestatic

Definition at line 464 of file shaders.h.

◆ GX2GetPixelUniformBlock()

static GX2UniformBlock* GX2GetPixelUniformBlock ( const GX2PixelShader shader,
const char *  name 
)
inlinestatic

Definition at line 477 of file shaders.h.

◆ GX2GetVertexUniformBlock()

static GX2UniformBlock* GX2GetVertexUniformBlock ( const GX2VertexShader shader,
const char *  name 
)
inlinestatic

Definition at line 490 of file shaders.h.

◆ GX2GetGeometryUniformVar()

static GX2UniformVar* GX2GetGeometryUniformVar ( const GX2GeometryShader shader,
const char *  name 
)
inlinestatic

Definition at line 503 of file shaders.h.

◆ GX2GetPixelUniformVar()

static GX2UniformVar* GX2GetPixelUniformVar ( const GX2PixelShader shader,
const char *  name 
)
inlinestatic

Definition at line 516 of file shaders.h.

◆ GX2GetVertexUniformVar()

static GX2UniformVar* GX2GetVertexUniformVar ( const GX2VertexShader shader,
const char *  name 
)
inlinestatic

Definition at line 529 of file shaders.h.

◆ GX2SetShaderMode()

static void GX2SetShaderMode ( GX2ShaderMode  mode)
inlinestatic

Definition at line 542 of file shaders.h.