RetroArch
gx2_common.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <wiiu/gx2.h>
4 
5 #include "../video_defines.h"
6 #include "../video_shader_parse.h"
7 
8 #include "../drivers/gx2_shaders/frame.h"
9 #include "../drivers/gx2_shaders/tex.h"
10 #include "../drivers/gx2_shaders/sprite.h"
11 #include "../drivers/gx2_shaders/menu_shaders.h"
12 
13 #undef _X
14 #undef _B
15 
16 #define _X 0x00
17 #define _Y 0x01
18 #define _Z 0x02
19 #define _W 0x03
20 #define _R 0x00
21 #define _G 0x01
22 #define _B 0x02
23 #define _A 0x03
24 #define _0 0x04
25 #define _1 0x05
26 #define GX2_COMP_SEL(c0, c1, c2, c3) (((c0) << 24) | ((c1) << 16) | ((c2) << 8) | (c3))
27 
28 #define COLOR_ARGB(r, g, b, a) (((u32)(a) << 24) | ((u32)(r) << 16) | ((u32)(g) << 8) | ((u32)(b) << 0))
29 #define COLOR_RGBA(r, g, b, a) (((u32)(r) << 24) | ((u32)(g) << 16) | ((u32)(b) << 8) | ((u32)(a) << 0))
30 
31 typedef struct
32 {
33  int width;
34  int height;
37 
39 {
42  float alpha_mod;
43 };
44 
45 typedef struct
46 {
47  struct
48  {
50  int width;
51  int height;
52  bool enable;
54  } menu;
55 
56 #ifdef HAVE_OVERLAY
57  struct gx2_overlay_data *overlay;
58  unsigned overlays;
59  bool overlay_enable;
60  bool overlay_full_screen;
61 #endif
62 
63  GX2Sampler sampler_nearest[RARCH_WRAP_MAX];
64  GX2Sampler sampler_linear[RARCH_WRAP_MAX];
74 
75  int width;
76  int height;
77 
80 
81  struct
82  {
84  int size;
85  int current;
86  } vertex_cache;
87  struct
88  {
90  int size;
91  int current;
92  } vertex_cache_tex;
93 
98  void* cmd_buffer;
100  struct
101  {
103  float* vs_ubos[2];
104  float* ps_ubos[2];
106  GX2ColorBuffer color_buffer;
107  bool mem1;
110 
113  int frames;
115  bool vsync;
116  bool rgb32;
117  bool smooth;
118  unsigned rotation;
122 } wiiu_video_t;
wiiu_render_mode_t render_mode
Definition: gx2_common.h:111
unsigned rotation
Definition: gx2_common.h:118
void * drc_scan_buffer
Definition: gx2_common.h:94
int current
Definition: gx2_common.h:85
float * menu_shader_vbo
Definition: gx2_common.h:78
bool rgb32
Definition: gx2_common.h:116
GFDFile * gfd
Definition: gx2_common.h:102
Definition: shader_utils.h:49
Definition: context.h:21
bool keep_aspect
Definition: gx2_common.h:119
GX2_vec2
Definition: shader_utils.h:25
int size
Definition: gx2_common.h:84
GLsizeiptr size
Definition: glext.h:6559
#define GFX_MAX_TEXTURES
Definition: video_shader_parse.h:34
menu_shader_uniform_t
Definition: menu_shaders.h:31
bool enable
Definition: gx2_common.h:52
Unknown compiler Device disconnected from port File already exists Saving to backup buffer Got connection No arguments supplied and no menu displaying help Waiting for client Enable horizontal animation for the menu This will have a performance hit Hard synchronize the CPU and GPU Reduces latency at the cost of performance Audio volume Auto loading savestate from Connecting to netplay host Connection slot Password Username Accounts List Endpoint Achievements Scan Content Import content Assets Audio Device Audio DSP Plugin Audio Filter Audio Audio Maximum Timing Skew Audio Output Dynamic Audio Rate Control Audio Audio Volume SaveRAM Autosave Interval Load Remap Files Automatically Back Info Scroll Down Start Toggle Menu Confirm OK Quit Defaults Toggle Menu Bluetooth Enable Cache Camera Driver Apply Cheat Changes Cheat File Save Cheat File As Description Locked Locked Test Unofficial Achievements Unlocked Config Configuration Collections Content Quick Menu Downloads Core Counters Core Information Categories Core name Permissions System manufacturer Controls Options Start a Core Automatically Buildbot Cores URL Updater CPU Cursor Custom Ratio Database Selection Favorites< Default > Directory not found Disk Cycle Tray Status Disk Index Don t care Download Core DPI Override Enable Driver Dynamic Wallpaper Enable Achievements Menu entry normal color Maximum Run Speed Limit Maximum Run Speed Frontend Counters Create game options file help Changing Virtual Gamepad Overlay Help Scanning For Content History List Enable Horizontal Menu Information Analog To Digital Type Left Analog X Left analog Left Analog Y Left analog Right Analog X Right analog Right Analog Y Right analog Gun Trigger Gun Aux A Gun Aux C Gun Select Gun D pad Down Gun D pad Right Analog Stick Deadzone Bind All Bind Timeout Hide Unbound Core Input Descriptors Device Index Input Driver Input Hotkey Binds A B Down D pad L3 L Left D pad R3 R Right D pad Start button X Y Mouse Mouse Mouse Wheel Down Wheel Right Max Users Cheat index Cheat toggle Disk next Enable hotkeys Fast forward toggle Fullscreen toggle Load state Movie record toggle On screen keyboard toggle Pause toggle Reset game Save state Next shader Slow motion Savestate slot Volume Hide Overlay In Menu Early Normal Input Remapping Save Autoconfig Small Keyboard Enable Turbo enable Input User u Binds Input Autoconfig Services Dutch Esperanto German Japanese Polish Russian Vietnamese Left Analog Core Info Linear Load Recent Load State Location Driver Logging Verbosity Database Settings Blue Dark Blue Shield Yellow Header Opacity Throttle Menu Framerate Menu Linear Filter Appearance Background opacity Multimedia Filter unknown extensions Nearest Netplay Check Frames Disconnect Connect to Netplay host Stop netplay host Netplay Client Enable Netplay settings Netplay TCP UDP Port Network Command Port Network Gamepad Network None No achievements to display No cores available No core options available No history available No items No playlists No settings found OFF Online Onscreen Display Onscreen Notifications Optional Autoload Preferred Overlay Overlay Opacity Overlay Scale Use PAL60 Mode Pause when menu activated Performance Counters Playlist Touch Support Present Quit RetroArch BBFC Rating Co op supported Description Edge Magazine Issue Edge Magazine Review Enhancement Hardware Famitsu Magazine Rating Genre Name PEGI Rating Releasedate Month Rumble supported SHA1 TGDB Rating Recording Config Recording Record Driver Save Output Recording as Remap File Save Core Remap File Required Restart RetroArch Resume RetroPad Achievements Rewind Granularity File Browser Display Start Screen Run Savefile Auto Load State Savestate Save Core Overrides Save New Configuration Saving Scan File Screenshot Search Settings Shader Shaders Simple Snow Show Advanced Settings Shutdown Sort Saves In Folders SSH Enable Start Remote RetroPad State Slot stdin Commands Suspend Screensaver System BIOS support Build date Cocoa support CoreText support Display metric DPI Display metric DirectSound support Dynamic library support EGL support FFmpeg support STB TrueType support Frontend name Git version HLSL support KMS EGL support Libusb support Network Command interface support OpenAL support OpenGL support OpenVG support Overlay support Charged Discharging PulseAudio support BMP RetroRating level RoarAudio support RSound support SDL2 support SDL1 support Threading support Video4Linux2 support Vulkan support X11 support XVideo support Take Screenshot Thumbnails Thumbnails Updater Screenshots Display time date True UI Companion Start On Boot Unable to read compressed file Undo Save State Updater Update Joypad Profiles Update Cheats Update Databases Update Lakka Update Slang Shaders User Interface User Use Builtin Media Player Allow rotation Aspect Ratio Crop Disable Desktop Composition Video Driver Video Filter Enable Onscreen Notifications Onscreen Notification Size Force disable sRGB FBO Use Fullscreen Mode Use GPU Recording Hard GPU Sync Max swapchain images Onscreen Notification Y Position Use Post Filter Recording Estimated Screen Framerate Rotation Integer Scale Video Shader Preview Shader Parameters Save Shader Preset As Save Game Preset Bilinear Filtering Vertical Video Deflicker Custom Viewport Width Custom Viewport Y Pos Vertical Windowed Fullscreen Mode Window Height Wi Fi Menu Font Red Color Menu Font Blue Color Custom Monochrome Systematic Pixel Retrosystem Menu Color Theme Dark Electric Blue Legacy Red Plain Volcanic Red Menu Scale Factor Display History Tab Display Music Tab Display Video Tab Menu Icon Theme Shader Preset Enable or disable unofficial achievements and or beta features for testing purposes Change drivers for this system Change settings for the core Change settings for display overlay
Definition: msg_hash_eo.h:1709
u32 output_ring_buffer_size
Definition: gx2_common.h:73
bool vsync
Definition: gx2_common.h:115
GX2_vec2 * ubo_tex
Definition: gx2_common.h:68
bool render_msg_enabled
Definition: gx2_common.h:121
Definition: texture.h:9
Definition: video_shader_parse.h:143
GX2_mat4x4 * ubo_mvp
Definition: gx2_common.h:69
GX2_vec2 * ubo_vp
Definition: gx2_common.h:67
GX2Texture texture
Definition: gx2_common.h:49
GLenum GLuint texture
Definition: glext.h:6935
void * output_ring_buffer
Definition: gx2_common.h:72
video_viewport_t vp
Definition: gx2_common.h:112
Definition: sampler.h:10
void * input_ring_buffer
Definition: gx2_common.h:70
bool should_resize
Definition: gx2_common.h:120
Definition: video_shader_parse.h:83
menu_shader_uniform_t * menu_shader_ubo
Definition: gx2_common.h:79
Definition: gx2_common.h:31
Definition: surface.h:43
sprite_vertex_t * v
Definition: gx2_common.h:53
GX2ContextState * ctx_state
Definition: gx2_common.h:97
int64_t OSTime
Definition: time.h:28
u32 input_ring_buffer_size
Definition: gx2_common.h:71
frame_vertex_t * v
Definition: gx2_common.h:66
int width
Definition: gx2_common.h:33
GX2TVRenderMode
Definition: enum.h:482
unsigned luts
Definition: video_shader_parse.h:156
const GLdouble * v
Definition: glext.h:6391
GX2ColorBuffer color_buffer
Definition: gx2_common.h:96
Definition: video_driver.h:686
Definition: gx2_common.h:45
GX2TVRenderMode mode
Definition: gx2_common.h:35
void * tv_scan_buffer
Definition: gx2_common.h:95
void * cmd_buffer
Definition: gx2_common.h:98
struct video_shader * shader_preset
Definition: gx2_common.h:99
OSTime last_vsync
Definition: gx2_common.h:114
GLint GLint GLsizei width
Definition: glext.h:6293
int height
Definition: gx2_common.h:51
bool mem1
Definition: gx2_common.h:107
int width
Definition: gx2_common.h:50
struct video_shader_pass pass[GFX_MAX_SHADERS]
Definition: video_shader_parse.h:164
sprite_vertex_t v
Definition: gx2_common.h:41
GX2Texture tex
Definition: gx2_common.h:40
#define GFX_MAX_SHADERS
Definition: video_shader_parse.h:30
int frames
Definition: gx2_common.h:113
tex_shader_vertex_t * v
Definition: gx2_common.h:89
Definition: gx2_common.h:38
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
Definition: shader_utils.h:81
Definition: tex.h:25
Definition: sprite.h:25
Definition: frame.h:25
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
int height
Definition: gx2_common.h:34
float alpha_mod
Definition: gx2_common.h:42
bool smooth
Definition: gx2_common.h:117