From f5d65448d674ab1192c8275022329d9ab7410e27 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 11 Dec 2019 20:28:14 +1000 Subject: [PATCH] GPU: Improve structure alignment --- src/core/gpu.cpp | 6 +++--- src/core/gpu.h | 12 +++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp index 02ec0b3f7..a553f88df 100644 --- a/src/core/gpu.cpp +++ b/src/core/gpu.cpp @@ -75,6 +75,9 @@ bool GPU::DoState(StateWrapper& sw) sw.Do(&m_GPUSTAT.bits); + sw.Do(&m_draw_mode.mode_reg.bits); + sw.Do(&m_draw_mode.palette_reg); + sw.Do(&m_draw_mode.texture_window_value); sw.Do(&m_draw_mode.texture_page_x); sw.Do(&m_draw_mode.texture_page_y); sw.Do(&m_draw_mode.texture_palette_x); @@ -85,9 +88,6 @@ bool GPU::DoState(StateWrapper& sw) sw.Do(&m_draw_mode.texture_window_offset_y); sw.Do(&m_draw_mode.texture_x_flip); sw.Do(&m_draw_mode.texture_y_flip); - sw.Do(&m_draw_mode.mode_reg.bits); - sw.Do(&m_draw_mode.palette_reg); - sw.Do(&m_draw_mode.texture_window_value); sw.Do(&m_drawing_area.left); sw.Do(&m_drawing_area.top); diff --git a/src/core/gpu.h b/src/core/gpu.h index 9bdf2fd56..d532652a3 100644 --- a/src/core/gpu.h +++ b/src/core/gpu.h @@ -401,6 +401,11 @@ protected: u32 GetTexturePageYBase() const { return ZeroExtend32(texture_page_y_base.GetValue()) * 256; } }; + // original values + Reg mode_reg; + u16 palette_reg; // from vertex + u32 texture_window_value; + // decoded values u32 texture_page_x; u32 texture_page_y; @@ -412,12 +417,6 @@ protected: u8 texture_window_offset_y; // in 8 pixel steps bool texture_x_flip; bool texture_y_flip; - - // original values - Reg mode_reg; - u16 palette_reg; // from vertex - u32 texture_window_value; - bool texture_page_changed; bool texture_window_changed; @@ -520,7 +519,6 @@ protected: u32 current_scanline; float display_aspect_ratio; - bool in_hblank; bool in_vblank; } m_crtc_state = {};