mirror of
https://github.com/libretro/RetroArch
synced 2025-01-17 01:16:25 +00:00
68 lines
1.3 KiB
C
68 lines
1.3 KiB
C
|
#pragma once
|
||
|
|
||
|
#include <wiiu/gx2/shaders.h>
|
||
|
|
||
|
/* incompatible with elf builds */
|
||
|
//#define GX2_CAN_ACCESS_DATA_SECTION
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
typedef union
|
||
|
__attribute__((aligned (16)))
|
||
|
{
|
||
|
struct __attribute__((scalar_storage_order ("little-endian")))
|
||
|
{
|
||
|
float x;
|
||
|
float y;
|
||
|
};
|
||
|
struct __attribute__((scalar_storage_order ("little-endian")))
|
||
|
{
|
||
|
float width;
|
||
|
float height;
|
||
|
};
|
||
|
}GX2_vec2;
|
||
|
|
||
|
typedef struct
|
||
|
__attribute__((aligned (16)))
|
||
|
__attribute__((scalar_storage_order ("little-endian")))
|
||
|
{
|
||
|
float x;
|
||
|
float y;
|
||
|
union
|
||
|
{
|
||
|
struct __attribute__((scalar_storage_order ("little-endian")))
|
||
|
{
|
||
|
float z;
|
||
|
float w;
|
||
|
};
|
||
|
struct __attribute__((scalar_storage_order ("little-endian")))
|
||
|
{
|
||
|
float width;
|
||
|
float height;
|
||
|
};
|
||
|
};
|
||
|
}GX2_vec4;
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
GX2VertexShader vs;
|
||
|
GX2PixelShader ps;
|
||
|
GX2GeometryShader gs;
|
||
|
GX2FetchShader fs;
|
||
|
GX2AttribStream* attribute_stream;
|
||
|
}GX2Shader;
|
||
|
|
||
|
void GX2InitShader(GX2Shader* shader);
|
||
|
void GX2DestroyShader(GX2Shader* shader);
|
||
|
void GX2SetShader(GX2Shader* shader);
|
||
|
|
||
|
void check_shader(const void* shader_, u32 shader_size, const void* org_, u32 org_size, const char* name);
|
||
|
void check_shader_verbose(u32* shader, u32 shader_size, u32* org, u32 org_size, const char* name);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|