diff --git a/gfx/common/d3d12_common.h b/gfx/common/d3d12_common.h index 98640f1555..7f6827ea30 100644 --- a/gfx/common/d3d12_common.h +++ b/gfx/common/d3d12_common.h @@ -81,12 +81,12 @@ typedef struct { float u, v, w, h; } coords; - UINT32 colors[4]; struct { float scaling; float rotation; } params; + UINT32 colors[4]; } d3d12_sprite_t; typedef struct @@ -115,8 +115,8 @@ typedef struct UINT64 row_size_in_bytes; UINT64 total_bytes; d3d12_descriptor_heap_t* srv_heap; - bool dirty; float4_t size_data; + bool dirty; } d3d12_texture_t; #ifndef ALIGN diff --git a/gfx/common/gdi_common.h b/gfx/common/gdi_common.h index 3b234abcc2..bb5dd31df1 100644 --- a/gfx/common/gdi_common.h +++ b/gfx/common/gdi_common.h @@ -18,7 +18,24 @@ #ifndef __GDI_COMMON_H #define __GDI_COMMON_H +#include + #include +#include + +typedef struct gdi_texture +{ + HBITMAP bmp; + HBITMAP bmp_old; + void *data; + + int width; + int height; + int active_width; + int active_height; + + enum texture_filter_type type; +} gdi_texture_t; typedef struct gdi { @@ -30,6 +47,9 @@ typedef struct gdi HDC texDC; HBITMAP bmp; HBITMAP bmp_old; + uint16_t *temp_buf; + uint8_t *menu_frame; + unsigned video_width; unsigned video_height; unsigned screen_width; @@ -41,29 +61,14 @@ typedef struct gdi unsigned video_pitch; unsigned video_bits; unsigned menu_bits; - bool rgb32; - bool menu_rgb32; int win_major; int win_minor; - bool lte_win98; - unsigned short *temp_buf; - unsigned char *menu_frame; + bool rgb32; + bool menu_rgb32; + bool lte_win98; bool menu_enable; bool menu_full_screen; } gdi_t; -typedef struct gdi_texture -{ - int width; - int height; - int active_width; - int active_height; - - enum texture_filter_type type; - void* data; - HBITMAP bmp; - HBITMAP bmp_old; -} gdi_texture_t; - #endif diff --git a/gfx/common/gl1_common.h b/gfx/common/gl1_common.h index 3fc141c903..fb18e14b67 100644 --- a/gfx/common/gl1_common.h +++ b/gfx/common/gl1_common.h @@ -21,6 +21,7 @@ #include #include #include +#include #if defined(__APPLE__) #include @@ -51,30 +52,29 @@ #define RARCH_GL1_TEXTURE_TYPE32 GL_BGRA_EXT #define RARCH_GL1_FORMAT32 GL_UNSIGNED_BYTE -struct string_list; - typedef struct gl1 { - bool fullscreen; - bool menu_rgb32; - bool menu_size_changed; - bool rgb32; - bool supports_bgra; - bool keep_aspect; - bool should_resize; - bool menu_texture_enable; - bool menu_texture_full_screen; - bool have_sync; - bool smooth; - bool menu_smooth; - bool overlay_enable; - bool overlay_full_screen; - bool shared_context_use; + struct video_viewport vp; + struct video_coords coords; + math_matrix_4x4 mvp, mvp_no_rot; + + void *ctx_data; + const gfx_ctx_driver_t *ctx_driver; + struct string_list *extensions; + struct video_tex_info tex_info; + void *readback_buffer_screenshot; + GLuint *overlay_tex; + float *overlay_vertex_coord; + float *overlay_tex_coord; + float *overlay_color_coord; + const float *vertex_ptr; + const float *white_color_ptr; + unsigned char *menu_frame; + unsigned char *video_buf; + unsigned char *menu_video_buf; int version_major; int version_minor; - - unsigned video_width; unsigned video_height; unsigned video_pitch; @@ -94,26 +94,23 @@ typedef struct gl1 GLuint tex; GLuint menu_tex; - - struct video_viewport vp; - struct video_coords coords; - math_matrix_4x4 mvp, mvp_no_rot; - - void *ctx_data; - const gfx_ctx_driver_t *ctx_driver; - struct string_list *extensions; - struct video_tex_info tex_info; - void *readback_buffer_screenshot; - GLuint *overlay_tex; - float *overlay_vertex_coord; - float *overlay_tex_coord; - float *overlay_color_coord; - const float *vertex_ptr; - const float *white_color_ptr; - unsigned char *menu_frame; - unsigned char *video_buf; - unsigned char *menu_video_buf; GLuint texture[GFX_MAX_TEXTURES]; + + bool fullscreen; + bool menu_rgb32; + bool menu_size_changed; + bool rgb32; + bool supports_bgra; + bool keep_aspect; + bool should_resize; + bool menu_texture_enable; + bool menu_texture_full_screen; + bool have_sync; + bool smooth; + bool menu_smooth; + bool overlay_enable; + bool overlay_full_screen; + bool shared_context_use; } gl1_t; static INLINE void gl1_bind_texture(GLuint id, GLint wrap_mode, GLint mag_filter, diff --git a/gfx/common/gx2_common.h b/gfx/common/gx2_common.h index 3b424f4b44..d893f8fe5c 100644 --- a/gfx/common/gx2_common.h +++ b/gfx/common/gx2_common.h @@ -63,13 +63,13 @@ typedef struct GX2Sampler sampler_nearest[RARCH_WRAP_MAX]; GX2Sampler sampler_linear[RARCH_WRAP_MAX]; GX2Texture texture; - frame_vertex_t* v; - GX2_vec2* ubo_vp; - GX2_vec2* ubo_tex; - GX2_mat4x4* ubo_mvp; - void* input_ring_buffer; + frame_vertex_t *v; + GX2_vec2 *ubo_vp; + GX2_vec2 *ubo_tex; + GX2_mat4x4 *ubo_mvp; + void *input_ring_buffer; + void *output_ring_buffer; u32 input_ring_buffer_size; - void* output_ring_buffer; u32 output_ring_buffer_size; int width; @@ -84,6 +84,7 @@ typedef struct int size; int current; } vertex_cache; + struct { tex_shader_vertex_t* v; @@ -91,31 +92,31 @@ typedef struct int current; } vertex_cache_tex; - void* drc_scan_buffer; - void* tv_scan_buffer; + void *drc_scan_buffer; + void *tv_scan_buffer; + void *cmd_buffer; GX2ColorBuffer color_buffer; - GX2ContextState* ctx_state; - void* cmd_buffer; - struct video_shader* shader_preset; + GX2ContextState *ctx_state; + struct video_shader *shader_preset; struct { - GFDFile* gfd; - float* vs_ubos[2]; - float* ps_ubos[2]; + GFDFile *gfd; + float *vs_ubos[2]; + float *ps_ubos[2]; GX2Texture texture; GX2ColorBuffer color_buffer; bool mem1; - }pass[GFX_MAX_SHADERS]; + } pass[GFX_MAX_SHADERS]; GX2Texture luts[GFX_MAX_TEXTURES]; wiiu_render_mode_t render_mode; video_viewport_t vp; int frames; OSTime last_vsync; + unsigned rotation; bool vsync; bool rgb32; bool smooth; - unsigned rotation; bool keep_aspect; bool should_resize; bool render_msg_enabled; diff --git a/gfx/common/sdl2_common.h b/gfx/common/sdl2_common.h index cc30d36ab2..6a5ee11258 100644 --- a/gfx/common/sdl2_common.h +++ b/gfx/common/sdl2_common.h @@ -38,27 +38,28 @@ typedef struct sdl2_tex typedef struct _sdl2_video { - bool gl; - bool quitting; - bool should_resize; - - uint8_t font_r; - uint8_t font_g; - uint8_t font_b; - double rotation; struct video_viewport vp; video_info_t video; - sdl2_tex_t frame; - sdl2_tex_t menu; - sdl2_tex_t font; + + sdl2_tex_t frame; /* ptr alignment */ + sdl2_tex_t menu; /* ptr alignment */ + sdl2_tex_t font; /* ptr alignment */ SDL_Window *window; SDL_Renderer *renderer; void *font_data; const font_renderer_driver_t *font_driver; + + uint8_t font_r; + uint8_t font_g; + uint8_t font_b; + + bool gl; + bool quitting; + bool should_resize; } sdl2_video_t; void sdl2_set_handles(void *data, enum rarch_display_type diff --git a/gfx/common/vita2d_common.h b/gfx/common/vita2d_common.h index e6e128bb0a..a4c6aa0f19 100644 --- a/gfx/common/vita2d_common.h +++ b/gfx/common/vita2d_common.h @@ -30,10 +30,10 @@ typedef struct vita_menu_frame { - bool active; + vita2d_texture *texture; int width; int height; - vita2d_texture *texture; + bool active; } vita_menu_t; #ifdef HAVE_OVERLAY @@ -62,31 +62,30 @@ typedef struct vita_video int height; SceGxmTextureFilter tex_filter; - bool fullscreen; - bool vsync; - bool rgb32; - video_viewport_t vp; - unsigned rotation; math_matrix_4x4 mvp, mvp_no_rot; - bool vblank_not_reached; - bool keep_aspect; - bool should_resize; - vita_menu_t menu; #ifdef HAVE_OVERLAY struct vita_overlay_data *overlay; unsigned overlays; +#endif + unsigned video_width; + unsigned video_height; + unsigned rotation; + +#ifdef HAVE_OVERLAY bool overlay_enable; bool overlay_full_screen; #endif - - unsigned video_width; - unsigned video_height; - + bool fullscreen; + bool vsync; + bool rgb32; + bool vblank_not_reached; + bool keep_aspect; + bool should_resize; } vita_video_t; #endif