wut  v1.7.0
Wii U Toolchain
shaders.h
Go to the documentation of this file.
1 #pragma once
2 #include <string.h>
3 #include <wut.h>
4 #include "enum.h"
5 #include "sampler.h"
6 #include "gx2r/buffer.h"
7 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 typedef struct GX2AttribVar GX2AttribVar;
19 typedef struct GX2AttribStream GX2AttribStream;
20 typedef struct GX2FetchShader GX2FetchShader;
22 typedef struct GX2LoopVar GX2LoopVar;
23 typedef struct GX2PixelShader GX2PixelShader;
24 typedef struct GX2SamplerVar GX2SamplerVar;
25 typedef struct GX2UniformBlock GX2UniformBlock;
26 typedef struct GX2UniformVar GX2UniformVar;
28 typedef struct GX2VertexShader GX2VertexShader;
29 
31 {
33 
34  struct
35  {
36  uint32_t sq_pgm_resources_fs;
37  } regs;
38 
39  uint32_t size;
40  void *program;
41  uint32_t attribCount;
42  uint32_t numDivisors;
43  uint32_t divisors[2];
44 };
45 WUT_CHECK_OFFSET(GX2FetchShader, 0x0, type);
46 WUT_CHECK_OFFSET(GX2FetchShader, 0x4, regs.sq_pgm_resources_fs);
47 WUT_CHECK_OFFSET(GX2FetchShader, 0x8, size);
48 WUT_CHECK_OFFSET(GX2FetchShader, 0xc, program);
49 WUT_CHECK_OFFSET(GX2FetchShader, 0x10, attribCount);
50 WUT_CHECK_OFFSET(GX2FetchShader, 0x14, numDivisors);
51 WUT_CHECK_OFFSET(GX2FetchShader, 0x18, divisors);
52 WUT_CHECK_SIZE(GX2FetchShader, 0x20);
53 
55 {
56  const char *name;
57  uint32_t offset;
58  uint32_t size;
59 };
60 WUT_CHECK_OFFSET(GX2UniformBlock, 0x00, name);
61 WUT_CHECK_OFFSET(GX2UniformBlock, 0x04, offset);
62 WUT_CHECK_OFFSET(GX2UniformBlock, 0x08, size);
63 WUT_CHECK_SIZE(GX2UniformBlock, 0x0C);
64 
66 {
67  const char *name;
69  uint32_t count;
70  uint32_t offset;
71  int32_t block;
72 };
73 WUT_CHECK_OFFSET(GX2UniformVar, 0x00, name);
74 WUT_CHECK_OFFSET(GX2UniformVar, 0x04, type);
75 WUT_CHECK_OFFSET(GX2UniformVar, 0x08, count);
76 WUT_CHECK_OFFSET(GX2UniformVar, 0x0C, offset);
77 WUT_CHECK_OFFSET(GX2UniformVar, 0x10, block);
78 WUT_CHECK_SIZE(GX2UniformVar, 0x14);
79 
81 {
82  float value[4];
83  uint32_t offset;
84 };
85 WUT_CHECK_OFFSET(GX2UniformInitialValue, 0x00, value);
86 WUT_CHECK_OFFSET(GX2UniformInitialValue, 0x10, offset);
87 WUT_CHECK_SIZE(GX2UniformInitialValue, 0x14);
88 
89 struct GX2LoopVar
90 {
91  uint32_t offset;
92  uint32_t value;
93 };
94 WUT_CHECK_OFFSET(GX2LoopVar, 0x00, offset);
95 WUT_CHECK_OFFSET(GX2LoopVar, 0x04, value);
96 WUT_CHECK_SIZE(GX2LoopVar, 0x08);
97 
99 {
100  const char *name;
102  uint32_t location;
103 };
104 WUT_CHECK_OFFSET(GX2SamplerVar, 0x00, name);
105 WUT_CHECK_OFFSET(GX2SamplerVar, 0x04, type);
106 WUT_CHECK_OFFSET(GX2SamplerVar, 0x08, location);
107 WUT_CHECK_SIZE(GX2SamplerVar, 0x0C);
108 
110 {
111  const char *name;
113  uint32_t count;
114  uint32_t location;
115 };
116 WUT_CHECK_OFFSET(GX2AttribVar, 0x00, name);
117 WUT_CHECK_OFFSET(GX2AttribVar, 0x04, type);
118 WUT_CHECK_OFFSET(GX2AttribVar, 0x08, count);
119 WUT_CHECK_OFFSET(GX2AttribVar, 0x0C, location);
120 WUT_CHECK_SIZE(GX2AttribVar, 0x10);
121 
123 {
124  struct
125  {
126  uint32_t sq_pgm_resources_vs;
127  uint32_t vgt_primitiveid_en;
128  uint32_t spi_vs_out_config;
129  uint32_t num_spi_vs_out_id;
130  uint32_t spi_vs_out_id[10];
131  uint32_t pa_cl_vs_out_cntl;
132  uint32_t sq_vtx_semantic_clear;
133  uint32_t num_sq_vtx_semantic;
134  uint32_t sq_vtx_semantic[32];
135  uint32_t vgt_strmout_buffer_en;
136  uint32_t vgt_vertex_reuse_block_cntl;
137  uint32_t vgt_hos_reuse_depth;
138  } regs;
139 
140  uint32_t size;
141  void *program;
143 
146 
147  uint32_t uniformVarCount;
149 
152 
153  uint32_t loopVarCount;
155 
156  uint32_t samplerVarCount;
158 
159  uint32_t attribVarCount;
161 
162  uint32_t ringItemsize;
163 
165  uint32_t streamOutStride[4];
166 
168 };
169 WUT_CHECK_OFFSET(GX2VertexShader, 0x00, regs.sq_pgm_resources_vs);
170 WUT_CHECK_OFFSET(GX2VertexShader, 0x04, regs.vgt_primitiveid_en);
171 WUT_CHECK_OFFSET(GX2VertexShader, 0x08, regs.spi_vs_out_config);
172 WUT_CHECK_OFFSET(GX2VertexShader, 0x0C, regs.num_spi_vs_out_id);
173 WUT_CHECK_OFFSET(GX2VertexShader, 0x10, regs.spi_vs_out_id);
174 WUT_CHECK_OFFSET(GX2VertexShader, 0x38, regs.pa_cl_vs_out_cntl);
175 WUT_CHECK_OFFSET(GX2VertexShader, 0x3C, regs.sq_vtx_semantic_clear);
176 WUT_CHECK_OFFSET(GX2VertexShader, 0x40, regs.num_sq_vtx_semantic);
177 WUT_CHECK_OFFSET(GX2VertexShader, 0x44, regs.sq_vtx_semantic);
178 WUT_CHECK_OFFSET(GX2VertexShader, 0xC4, regs.vgt_strmout_buffer_en);
179 WUT_CHECK_OFFSET(GX2VertexShader, 0xC8, regs.vgt_vertex_reuse_block_cntl);
180 WUT_CHECK_OFFSET(GX2VertexShader, 0xCC, regs.vgt_hos_reuse_depth);
181 WUT_CHECK_OFFSET(GX2VertexShader, 0xD0, size);
182 WUT_CHECK_OFFSET(GX2VertexShader, 0xD4, program);
183 WUT_CHECK_OFFSET(GX2VertexShader, 0xD8, mode);
184 WUT_CHECK_OFFSET(GX2VertexShader, 0xDc, uniformBlockCount);
185 WUT_CHECK_OFFSET(GX2VertexShader, 0xE0, uniformBlocks);
186 WUT_CHECK_OFFSET(GX2VertexShader, 0xE4, uniformVarCount);
187 WUT_CHECK_OFFSET(GX2VertexShader, 0xE8, uniformVars);
188 WUT_CHECK_OFFSET(GX2VertexShader, 0xEc, initialValueCount);
189 WUT_CHECK_OFFSET(GX2VertexShader, 0xF0, initialValues);
190 WUT_CHECK_OFFSET(GX2VertexShader, 0xF4, loopVarCount);
191 WUT_CHECK_OFFSET(GX2VertexShader, 0xF8, loopVars);
192 WUT_CHECK_OFFSET(GX2VertexShader, 0xFc, samplerVarCount);
193 WUT_CHECK_OFFSET(GX2VertexShader, 0x100, samplerVars);
194 WUT_CHECK_OFFSET(GX2VertexShader, 0x104, attribVarCount);
195 WUT_CHECK_OFFSET(GX2VertexShader, 0x108, attribVars);
196 WUT_CHECK_OFFSET(GX2VertexShader, 0x10c, ringItemsize);
197 WUT_CHECK_OFFSET(GX2VertexShader, 0x110, hasStreamOut);
198 WUT_CHECK_OFFSET(GX2VertexShader, 0x114, streamOutStride);
199 WUT_CHECK_OFFSET(GX2VertexShader, 0x124, gx2rBuffer);
200 WUT_CHECK_SIZE(GX2VertexShader, 0x134);
201 
203 {
204  struct
205  {
206  uint32_t sq_pgm_resources_ps;
207  uint32_t sq_pgm_exports_ps;
208  uint32_t spi_ps_in_control_0;
209  uint32_t spi_ps_in_control_1;
210  uint32_t num_spi_ps_input_cntl;
211  uint32_t spi_ps_input_cntls[32];
212  uint32_t cb_shader_mask;
213  uint32_t cb_shader_control;
214  uint32_t db_shader_control;
215  uint32_t spi_input_z;
216  } regs;
217 
218  uint32_t size;
219  void *program;
221 
224 
225  uint32_t uniformVarCount;
227 
230 
231  uint32_t loopVarCount;
233 
234  uint32_t samplerVarCount;
236 
238 };
239 WUT_CHECK_OFFSET(GX2PixelShader, 0x00, regs.sq_pgm_resources_ps);
240 WUT_CHECK_OFFSET(GX2PixelShader, 0x04, regs.sq_pgm_exports_ps);
241 WUT_CHECK_OFFSET(GX2PixelShader, 0x08, regs.spi_ps_in_control_0);
242 WUT_CHECK_OFFSET(GX2PixelShader, 0x0C, regs.spi_ps_in_control_1);
243 WUT_CHECK_OFFSET(GX2PixelShader, 0x10, regs.num_spi_ps_input_cntl);
244 WUT_CHECK_OFFSET(GX2PixelShader, 0x14, regs.spi_ps_input_cntls);
245 WUT_CHECK_OFFSET(GX2PixelShader, 0x94, regs.cb_shader_mask);
246 WUT_CHECK_OFFSET(GX2PixelShader, 0x98, regs.cb_shader_control);
247 WUT_CHECK_OFFSET(GX2PixelShader, 0x9C, regs.db_shader_control);
248 WUT_CHECK_OFFSET(GX2PixelShader, 0xA0, regs.spi_input_z);
249 WUT_CHECK_OFFSET(GX2PixelShader, 0xA4, size);
250 WUT_CHECK_OFFSET(GX2PixelShader, 0xA8, program);
251 WUT_CHECK_OFFSET(GX2PixelShader, 0xAC, mode);
252 WUT_CHECK_OFFSET(GX2PixelShader, 0xB0, uniformBlockCount);
253 WUT_CHECK_OFFSET(GX2PixelShader, 0xB4, uniformBlocks);
254 WUT_CHECK_OFFSET(GX2PixelShader, 0xB8, uniformVarCount);
255 WUT_CHECK_OFFSET(GX2PixelShader, 0xBC, uniformVars);
256 WUT_CHECK_OFFSET(GX2PixelShader, 0xC0, initialValueCount);
257 WUT_CHECK_OFFSET(GX2PixelShader, 0xC4, initialValues);
258 WUT_CHECK_OFFSET(GX2PixelShader, 0xC8, loopVarCount);
259 WUT_CHECK_OFFSET(GX2PixelShader, 0xCC, loopVars);
260 WUT_CHECK_OFFSET(GX2PixelShader, 0xD0, samplerVarCount);
261 WUT_CHECK_OFFSET(GX2PixelShader, 0xD4, samplerVars);
262 WUT_CHECK_OFFSET(GX2PixelShader, 0xD8, gx2rBuffer);
263 WUT_CHECK_SIZE(GX2PixelShader, 0xE8);
264 
266 {
267  struct
268  {
269  uint32_t sq_pgm_resources_gs;
270  uint32_t vgt_gs_out_prim_type;
271  uint32_t vgt_gs_mode;
272  uint32_t pa_cl_vs_out_cntl;
273  uint32_t sq_pgm_resources_vs;
274  uint32_t sq_gs_vert_itemsize;
275  uint32_t spi_vs_out_config;
276  uint32_t num_spi_vs_out_id;
277  uint32_t spi_vs_out_id[10];
278  uint32_t vgt_strmout_buffer_en;
279  } regs;
280 
281  uint32_t size;
282  void *program;
286 
289 
290  uint32_t uniformVarCount;
292 
295 
296  uint32_t loopVarCount;
298 
299  uint32_t samplerVarCount;
301 
302  uint32_t ringItemSize;
304  uint32_t streamOutStride[4];
305 
307 };
308 WUT_CHECK_OFFSET(GX2GeometryShader, 0x00, regs.sq_pgm_resources_gs);
309 WUT_CHECK_OFFSET(GX2GeometryShader, 0x04, regs.vgt_gs_out_prim_type);
310 WUT_CHECK_OFFSET(GX2GeometryShader, 0x08, regs.vgt_gs_mode);
311 WUT_CHECK_OFFSET(GX2GeometryShader, 0x0C, regs.pa_cl_vs_out_cntl);
312 WUT_CHECK_OFFSET(GX2GeometryShader, 0x10, regs.sq_pgm_resources_vs);
313 WUT_CHECK_OFFSET(GX2GeometryShader, 0x14, regs.sq_gs_vert_itemsize);
314 WUT_CHECK_OFFSET(GX2GeometryShader, 0x18, regs.spi_vs_out_config);
315 WUT_CHECK_OFFSET(GX2GeometryShader, 0x1C, regs.num_spi_vs_out_id);
316 WUT_CHECK_OFFSET(GX2GeometryShader, 0x20, regs.spi_vs_out_id);
317 WUT_CHECK_OFFSET(GX2GeometryShader, 0x48, regs.vgt_strmout_buffer_en);
318 WUT_CHECK_OFFSET(GX2GeometryShader, 0x4C, size);
319 WUT_CHECK_OFFSET(GX2GeometryShader, 0x50, program);
320 WUT_CHECK_OFFSET(GX2GeometryShader, 0x54, vertexProgramSize);
321 WUT_CHECK_OFFSET(GX2GeometryShader, 0x58, vertexProgram);
322 WUT_CHECK_OFFSET(GX2GeometryShader, 0x5C, mode);
323 WUT_CHECK_OFFSET(GX2GeometryShader, 0x60, uniformBlockCount);
324 WUT_CHECK_OFFSET(GX2GeometryShader, 0x64, uniformBlocks);
325 WUT_CHECK_OFFSET(GX2GeometryShader, 0x68, uniformVarCount);
326 WUT_CHECK_OFFSET(GX2GeometryShader, 0x6C, uniformVars);
327 WUT_CHECK_OFFSET(GX2GeometryShader, 0x70, initialValueCount);
328 WUT_CHECK_OFFSET(GX2GeometryShader, 0x74, initialValues);
329 WUT_CHECK_OFFSET(GX2GeometryShader, 0x78, loopVarCount);
330 WUT_CHECK_OFFSET(GX2GeometryShader, 0x7C, loopVars);
331 WUT_CHECK_OFFSET(GX2GeometryShader, 0x80, samplerVarCount);
332 WUT_CHECK_OFFSET(GX2GeometryShader, 0x84, samplerVars);
333 WUT_CHECK_OFFSET(GX2GeometryShader, 0x88, ringItemSize);
334 WUT_CHECK_OFFSET(GX2GeometryShader, 0x8C, hasStreamOut);
335 WUT_CHECK_OFFSET(GX2GeometryShader, 0x90, streamOutStride);
336 WUT_CHECK_OFFSET(GX2GeometryShader, 0xA0, gx2rBuffer);
337 WUT_CHECK_SIZE(GX2GeometryShader, 0xB0);
338 
340 {
341  uint32_t location;
342  uint32_t buffer;
343  uint32_t offset;
346  uint32_t aluDivisor;
347  uint32_t mask;
349 };
350 WUT_CHECK_OFFSET(GX2AttribStream, 0x0, location);
351 WUT_CHECK_OFFSET(GX2AttribStream, 0x4, buffer);
352 WUT_CHECK_OFFSET(GX2AttribStream, 0x8, offset);
353 WUT_CHECK_OFFSET(GX2AttribStream, 0xc, format);
354 WUT_CHECK_OFFSET(GX2AttribStream, 0x10, type);
355 WUT_CHECK_OFFSET(GX2AttribStream, 0x14, aluDivisor);
356 WUT_CHECK_OFFSET(GX2AttribStream, 0x18, mask);
357 WUT_CHECK_OFFSET(GX2AttribStream, 0x1c, endianSwap);
358 WUT_CHECK_SIZE(GX2AttribStream, 0x20);
359 
360 uint32_t
362 
363 uint32_t
365 
366 uint32_t
367 GX2CalcFetchShaderSizeEx(uint32_t attribs,
368  GX2FetchShaderType fetchShaderType,
369  GX2TessellationMode tesellationMode);
370 
371 void
373  uint8_t *buffer,
374  uint32_t attribCount,
375  const GX2AttribStream *attribs,
376  GX2FetchShaderType type,
377  GX2TessellationMode tessMode);
378 
379 void
381 
382 void
384 
385 void
387 
388 void
390 
391 void
393  uint32_t id);
394 
395 void
397  uint32_t id);
398 
399 void
401  uint32_t id);
402 
403 void
404 GX2SetVertexUniformReg(uint32_t offset,
405  uint32_t count,
406  const void *data);
407 
408 void
409 GX2SetPixelUniformReg(uint32_t offset,
410  uint32_t count,
411  const void *data);
412 
413 void
414 GX2SetVertexUniformBlock(uint32_t location,
415  uint32_t size,
416  const void *data);
417 
418 void
419 GX2SetPixelUniformBlock(uint32_t location,
420  uint32_t size,
421  const void *data);
422 
423 void
424 GX2SetGeometryUniformBlock(uint32_t location,
425  uint32_t size,
426  const void *data);
427 
428 void
430  uint32_t numVsGpr, uint32_t numVsStackEntries,
431  uint32_t numGsGpr, uint32_t numGsStackEntries,
432  uint32_t numPsGpr, uint32_t numPsStackEntries);
433 
434 void
436 
437 void
439  uint32_t size);
440 
441 void
443  uint32_t size);
444 
445 uint32_t
447 
448 uint32_t
450 
451 uint32_t
453 
454 uint32_t
456 
457 uint32_t
459 
460 uint32_t
462 
463 static inline GX2UniformBlock *
465  const char *name)
466 {
467  for (uint32_t i = 0; i < shader->uniformBlockCount; ++i) {
468  if (strcmp(name, shader->uniformBlocks[i].name) == 0) {
469  return &shader->uniformBlocks[i];
470  }
471  }
472 
473  return NULL;
474 }
475 
476 static inline GX2UniformBlock *
478  const char *name)
479 {
480  for (uint32_t i = 0; i < shader->uniformBlockCount; ++i) {
481  if (strcmp(name, shader->uniformBlocks[i].name) == 0) {
482  return &shader->uniformBlocks[i];
483  }
484  }
485 
486  return NULL;
487 }
488 
489 static inline GX2UniformBlock *
491  const char *name)
492 {
493  for (uint32_t i = 0; i < shader->uniformBlockCount; ++i) {
494  if (strcmp(name, shader->uniformBlocks[i].name) == 0) {
495  return &shader->uniformBlocks[i];
496  }
497  }
498 
499  return NULL;
500 }
501 
502 static inline GX2UniformVar *
504  const char *name)
505 {
506  for (uint32_t i = 0; i < shader->uniformVarCount; ++i) {
507  if (strcmp(name, shader->uniformVars[i].name) == 0) {
508  return &shader->uniformVars[i];
509  }
510  }
511 
512  return NULL;
513 }
514 
515 static inline GX2UniformVar *
517  const char *name)
518 {
519  for (uint32_t i = 0; i < shader->uniformVarCount; ++i) {
520  if (strcmp(name, shader->uniformVars[i].name) == 0) {
521  return &shader->uniformVars[i];
522  }
523  }
524 
525  return NULL;
526 }
527 
528 static inline GX2UniformVar *
530  const char *name)
531 {
532  for (uint32_t i = 0; i < shader->uniformVarCount; ++i) {
533  if (strcmp(name, shader->uniformVars[i].name) == 0) {
534  return &shader->uniformVars[i];
535  }
536  }
537 
538  return NULL;
539 }
540 
541 static inline void
543 {
544  if (mode == GX2_SHADER_MODE_GEOMETRY_SHADER) {
545  GX2SetShaderModeEx(mode, 0x2c, 0x20, 0x40, 0x30, 0x4c, 0xb0);
546  } else {
547  GX2SetShaderModeEx(mode, 0x30, 0x40, 0x0, 0x0, 0xc8, 0xc0);
548  }
549 }
550 
551 #ifdef __cplusplus
552 }
553 #endif
554 
GX2AttribFormat
Definition: enum.h:53
GX2FetchShaderType
Definition: enum.h:216
GX2ShaderVarType
Definition: enum.h:360
GX2EndianSwapMode
Definition: enum.h:208
GX2ShaderMode
Definition: enum.h:352
GX2SamplerVarType
Definition: enum.h:332
GX2AttribIndexType
Definition: enum.h:105
GX2TessellationMode
Definition: enum.h:515
@ GX2_SHADER_MODE_GEOMETRY_SHADER
Definition: enum.h:355
GX2AttribVar * attribVars
Definition: shaders.h:160
uint32_t initialValueCount
Definition: shaders.h:150
struct GX2FetchShader::@16 regs
uint32_t attribVarCount
Definition: shaders.h:159
struct GX2PixelShader::@18 regs
GX2RBuffer gx2rBuffer
Definition: shaders.h:167
GX2SamplerVar * samplerVars
Definition: shaders.h:157
GX2UniformBlock * uniformBlocks
Definition: shaders.h:145
GX2EndianSwapMode endianSwap
Definition: shaders.h:348
void * vertexProgram
Definition: shaders.h:284
uint32_t vertexProgramSize
Definition: shaders.h:283
uint32_t numDivisors
Definition: shaders.h:42
GX2ShaderVarType type
Definition: shaders.h:68
uint32_t ringItemSize
Definition: shaders.h:302
GX2AttribFormat format
Definition: shaders.h:344
uint32_t divisors[2]
Definition: shaders.h:43
int32_t block
Definition: shaders.h:71
uint32_t streamOutStride[4]
Definition: shaders.h:165
uint32_t attribCount
Definition: shaders.h:41
GX2AttribIndexType type
Definition: shaders.h:345
struct GX2GeometryShader::@19 regs
uint32_t samplerVarCount
Definition: shaders.h:156
GX2FetchShaderType type
Definition: shaders.h:32
GX2ShaderMode mode
Definition: shaders.h:142
uint32_t count
Definition: shaders.h:69
uint32_t offset
Definition: shaders.h:57
uint32_t location
Definition: shaders.h:102
const char * name
Definition: shaders.h:56
GX2LoopVar * loopVars
Definition: shaders.h:154
uint32_t loopVarCount
Definition: shaders.h:153
struct GX2VertexShader::@17 regs
uint32_t uniformVarCount
Definition: shaders.h:147
GX2SamplerVarType type
Definition: shaders.h:101
uint32_t ringItemsize
Definition: shaders.h:162
uint32_t size
Definition: shaders.h:39
uint32_t buffer
Definition: shaders.h:342
uint32_t aluDivisor
Definition: shaders.h:346
uint32_t mask
Definition: shaders.h:347
uint32_t value
Definition: shaders.h:92
GX2UniformVar * uniformVars
Definition: shaders.h:148
uint32_t uniformBlockCount
Definition: shaders.h:144
void * program
Definition: shaders.h:40
BOOL hasStreamOut
Definition: shaders.h:164
GX2UniformInitialValue * initialValues
Definition: shaders.h:151
void GX2SetGeometryShader(const GX2GeometryShader *shader)
static GX2UniformVar * GX2GetGeometryUniformVar(const GX2GeometryShader *shader, const char *name)
Definition: shaders.h:503
uint32_t GX2CalcGeometryShaderInputRingBufferSize(uint32_t ringItemSize)
uint32_t GX2GetGeometryShaderGPRs(const GX2GeometryShader *shader)
void GX2InitFetchShaderEx(GX2FetchShader *fetchShader, uint8_t *buffer, uint32_t attribCount, const GX2AttribStream *attribs, GX2FetchShaderType type, GX2TessellationMode tessMode)
void GX2SetGeometryUniformBlock(uint32_t location, uint32_t size, const void *data)
void GX2SetVertexUniformReg(uint32_t offset, uint32_t count, const void *data)
void GX2SetPixelUniformReg(uint32_t offset, uint32_t count, 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 GX2SetPixelShader(const GX2PixelShader *shader)
static GX2UniformVar * GX2GetPixelUniformVar(const GX2PixelShader *shader, const char *name)
Definition: shaders.h:516
static GX2UniformVar * GX2GetVertexUniformVar(const GX2VertexShader *shader, const char *name)
Definition: shaders.h:529
void GX2SetStreamOutEnable(BOOL enable)
uint32_t GX2GetPixelShaderStackEntries(const GX2PixelShader *shader)
void GX2SetVertexUniformBlock(uint32_t location, uint32_t size, const void *data)
static void GX2SetShaderMode(GX2ShaderMode mode)
Definition: shaders.h:542
void GX2SetPixelUniformBlock(uint32_t location, uint32_t size, const void *data)
uint32_t GX2GetVertexShaderStackEntries(const GX2VertexShader *shader)
void GX2SetGeometryShaderOutputRingBuffer(void *buffer, uint32_t size)
void GX2SetFetchShader(const GX2FetchShader *shader)
static GX2UniformBlock * GX2GetPixelUniformBlock(const GX2PixelShader *shader, const char *name)
Definition: shaders.h:477
void GX2SetGeometryShaderInputRingBuffer(const void *buffer, uint32_t size)
void GX2SetPixelSampler(const GX2Sampler *sampler, uint32_t id)
static GX2UniformBlock * GX2GetVertexUniformBlock(const GX2VertexShader *shader, const char *name)
Definition: shaders.h:490
uint32_t GX2CalcFetchShaderSizeEx(uint32_t attribs, GX2FetchShaderType fetchShaderType, GX2TessellationMode tesellationMode)
void GX2SetVertexShader(const GX2VertexShader *shader)
uint32_t GX2GetPixelShaderGPRs(const GX2PixelShader *shader)
void GX2SetGeometrySampler(const GX2Sampler *sampler, uint32_t id)
static GX2UniformBlock * GX2GetGeometryUniformBlock(const GX2GeometryShader *shader, const char *name)
Definition: shaders.h:464
uint32_t GX2GetVertexShaderGPRs(const GX2VertexShader *shader)
void GX2SetVertexSampler(const GX2Sampler *sampler, uint32_t id)
uint32_t GX2CalcGeometryShaderOutputRingBufferSize(uint32_t ringItemSize)
uint32_t GX2GetGeometryShaderStackEntries(const GX2GeometryShader *shader)
int32_t BOOL
Definition: wut_types.h:7