RetroArch
shader_utils.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <wiiu/gx2/shaders.h>
4 
5 /* incompatible with elf builds */
6 /* #define GX2_CAN_ACCESS_DATA_SECTION */
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 typedef union
13 __attribute__((aligned (16)))
14 {
15  struct __attribute__((scalar_storage_order ("little-endian")))
16  {
17  float x;
18  float y;
19  };
20  struct __attribute__((scalar_storage_order ("little-endian")))
21  {
22  float width;
23  float height;
24  };
26 
27 typedef struct
28 __attribute__((aligned (16)))
29 __attribute__((scalar_storage_order ("little-endian")))
30 {
31  float x;
32  float y;
33  union
34  {
35  struct __attribute__((scalar_storage_order ("little-endian")))
36  {
37  float z;
38  float w;
39  };
40  struct __attribute__((scalar_storage_order ("little-endian")))
41  {
42  float width;
43  float height;
44  };
45  };
47 
48 
49 typedef union
50 {
51  struct
52  {
57  };
58  struct __attribute__((scalar_storage_order ("little-endian")))
59  {
60  float data[16];
61  };
62 }GX2_mat4x4;
63 
64 typedef struct
65 {
71 }GX2Shader;
72 
76 
77 void check_shader(const void* shader_, u32 shader_size, const void* org_, u32 org_size, const char* name);
78 void check_shader_verbose(u32* shader, u32 shader_size, u32* org, u32 org_size, const char* name);
79 
80 
81 typedef struct
82 {
85  u8* data;
86 } GFDFile;
87 
88 GFDFile* gfd_open(const char* filename);
89 void gfd_free(GFDFile* gfd);
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
GLuint shader
Definition: glext.h:6670
GLuint const GLchar * name
Definition: glext.h:6671
void GX2InitShader(GX2Shader *shader)
Definition: shader_utils.c:23
Definition: shader_utils.h:49
Definition: shaders.h:11
void check_shader_verbose(u32 *shader, u32 shader_size, u32 *org, u32 org_size, const char *name)
Definition: shader_utils.c:200
GX2PixelShader * ps
Definition: shader_utils.h:84
GX2_vec2
Definition: shader_utils.h:25
GX2_vec4 v0
Definition: shader_utils.h:53
Definition: shader_utils.h:64
union __attribute__((aligned(16)))
Definition: shader_utils.h:13
GLdouble GLdouble z
Definition: glext.h:6514
Definition: shaders.h:70
Definition: ibxm.h:9
GX2_vec4
Definition: shader_utils.h:46
Definition: shaders.h:215
GX2_vec4 v1
Definition: shader_utils.h:54
void GX2DestroyShader(GX2Shader *shader)
Definition: shader_utils.c:71
GX2VertexShader vs
Definition: shader_utils.h:66
void check_shader(const void *shader_, u32 shader_size, const void *org_, u32 org_size, const char *name)
Definition: shader_utils.c:223
GX2_vec4 v2
Definition: shader_utils.h:55
GX2GeometryShader gs
Definition: shader_utils.h:68
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
char little
Definition: lstrlib.c:1126
GFDFile * gfd_open(const char *filename)
Definition: shader_utils.c:373
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
GX2_vec4 v3
Definition: shader_utils.h:56
GX2AttribStream * attribute_stream
Definition: shader_utils.h:70
GX2PixelShader ps
Definition: shader_utils.h:67
GX2VertexShader * vs
Definition: shader_utils.h:83
u8 * data
Definition: shader_utils.h:85
Definition: shaders.h:378
void GX2SetShader(GX2Shader *shader)
Definition: shader_utils.c:91
GLint GLint GLsizei width
Definition: glext.h:6293
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6742
void gfd_free(GFDFile *gfd)
Definition: shader_utils.c:321
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
GX2FetchShader fs
Definition: shader_utils.h:69
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
Definition: shader_utils.h:81
Definition: shaders.h:520
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293