GPU: Fix batching regression (draws split on texture page)

This commit is contained in:
Connor McLaughlin
2019-11-03 00:36:47 +10:00
parent 5abbdef065
commit ba1a5a5ca9
5 changed files with 42 additions and 36 deletions

View File

@ -337,7 +337,7 @@ protected:
u32 texture_page_y;
u32 texture_palette_x;
u32 texture_palette_y;
TextureMode texture_color_mode;
TextureMode texture_mode;
TransparencyMode transparency_mode;
u8 texture_window_mask_x; // in 8 pixel steps
u8 texture_window_mask_y; // in 8 pixel steps
@ -354,6 +354,13 @@ protected:
bool texture_page_changed = false;
bool texture_window_changed = false;
/// Returns true if the texture mode requires a palette.
bool IsUsingPalette() const
{
return (static_cast<u8>(texture_mode) &
(static_cast<u8>(TextureMode::Palette4Bit) | static_cast<u8>(TextureMode::Palette8Bit))) != 0;
}
bool IsTexturePageChanged() const { return texture_page_changed; }
void ClearTexturePageChangedFlag() { texture_page_changed = false; }