From 7bb63a213c15e8e73bc554f1c3299be928bee057 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 14 Aug 2020 21:09:24 +0200 Subject: [PATCH] Struct reordering/alignment --- gfx/gfx_display.h | 34 +++++++++++++++++----------------- retroarch.c | 8 ++++---- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/gfx/gfx_display.h b/gfx/gfx_display.h index 7e6d3369d4..bf437a58d0 100644 --- a/gfx/gfx_display.h +++ b/gfx/gfx_display.h @@ -153,28 +153,28 @@ struct gfx_display_ctx_draw const void *backend_data; struct video_coords *coords; void *matrix_data; - enum gfx_display_prim_type prim_type; - bool pipeline_active; + uintptr_t texture; + size_t vertex_count; + size_t backend_data_size; + unsigned width; + unsigned height; + unsigned pipeline_id; float x; float y; float rotation; float scale_factor; - unsigned width; - unsigned height; - unsigned pipeline_id; - uintptr_t texture; - size_t vertex_count; - size_t backend_data_size; + enum gfx_display_prim_type prim_type; + bool pipeline_active; }; typedef struct gfx_display_ctx_rotate_draw { - bool scale_enable; + math_matrix_4x4 *matrix; float rotation; float scale_x; float scale_y; float scale_z; - math_matrix_4x4 *matrix; + bool scale_enable; } gfx_display_ctx_rotate_draw_t; typedef struct gfx_display_ctx_coord_draw @@ -201,22 +201,22 @@ typedef struct gfx_display_ctx_powerstate struct gfx_display { - bool has_windowed; - bool msg_force; - bool framebuf_dirty; - + gfx_display_ctx_driver_t *dispctx; + video_coord_array_t dispca; /* ptr alignment */ + /* Width, height and pitch of the display framebuffer */ + size_t framebuf_pitch; unsigned framebuf_width; unsigned framebuf_height; - size_t framebuf_pitch; /* Height of the display header */ unsigned header_height; enum menu_driver_id_type menu_driver_id; - video_coord_array_t dispca; - gfx_display_ctx_driver_t *dispctx; + bool has_windowed; + bool msg_force; + bool framebuf_dirty; }; typedef struct gfx_display gfx_display_t; diff --git a/retroarch.c b/retroarch.c index b790c98551..0e348f3de8 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2089,12 +2089,13 @@ struct rarch_state const struct retro_keybind *libretro_input_binds[MAX_USERS]; - core_info_state_t core_info_st; /* ptr alignment */ - rarch_system_info_t runloop_system; /* ptr alignment */ + core_info_state_t core_info_st; /* ptr alignment */ + rarch_system_info_t runloop_system; /* ptr alignment */ struct retro_hw_render_callback hw_render; /* ptr alignment */ #ifdef HAVE_BSV_MOVIE - bsv_movie_t *bsv_movie_state_handle; /* ptr alignment */ + bsv_movie_t *bsv_movie_state_handle; /* ptr alignment */ #endif + gfx_display_t dispgfx; /* ptr alignment */ /*************************************/ /* TODO/FIXME BEGIN - find alignment */ @@ -2160,7 +2161,6 @@ struct rarch_state #ifdef HAVE_DISCORD discord_state_t discord_st; #endif - gfx_display_t dispgfx; struct retro_callbacks retro_ctx; struct retro_core_t current_core;