GPU: Improve structure alignment

This commit is contained in:
Connor McLaughlin 2019-12-11 20:28:14 +10:00
parent 8f624afb59
commit f5d65448d6
2 changed files with 8 additions and 10 deletions

View file

@ -75,6 +75,9 @@ bool GPU::DoState(StateWrapper& sw)
sw.Do(&m_GPUSTAT.bits); 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_x);
sw.Do(&m_draw_mode.texture_page_y); sw.Do(&m_draw_mode.texture_page_y);
sw.Do(&m_draw_mode.texture_palette_x); 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_window_offset_y);
sw.Do(&m_draw_mode.texture_x_flip); sw.Do(&m_draw_mode.texture_x_flip);
sw.Do(&m_draw_mode.texture_y_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.left);
sw.Do(&m_drawing_area.top); sw.Do(&m_drawing_area.top);

View file

@ -401,6 +401,11 @@ protected:
u32 GetTexturePageYBase() const { return ZeroExtend32(texture_page_y_base.GetValue()) * 256; } 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 // decoded values
u32 texture_page_x; u32 texture_page_x;
u32 texture_page_y; u32 texture_page_y;
@ -412,12 +417,6 @@ protected:
u8 texture_window_offset_y; // in 8 pixel steps u8 texture_window_offset_y; // in 8 pixel steps
bool texture_x_flip; bool texture_x_flip;
bool texture_y_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_page_changed;
bool texture_window_changed; bool texture_window_changed;
@ -520,7 +519,6 @@ protected:
u32 current_scanline; u32 current_scanline;
float display_aspect_ratio; float display_aspect_ratio;
bool in_hblank; bool in_hblank;
bool in_vblank; bool in_vblank;
} m_crtc_state = {}; } m_crtc_state = {};