GPU/HW: Split dirty rect into draw/write

Significant performance improvement in Persona 2.
This commit is contained in:
Stenzek
2023-12-14 19:01:24 +10:00
parent 5218ac6944
commit 23d5b20da6
3 changed files with 158 additions and 62 deletions

View File

@ -3,10 +3,10 @@
#pragma once
#include <algorithm>
#include <cstring>
#include <limits>
#include <tuple>
#include <type_traits>
#include <cstring>
namespace Common {
@ -131,6 +131,10 @@ struct Rectangle
/// Tests whether the specified point is contained in the rectangle.
constexpr bool Contains(T x, T y) const { return (x >= left && x < right && y >= top && y < bottom); }
constexpr bool Contains(const Rectangle& rhs) const
{
return (left <= rhs.left && right >= rhs.right && top <= rhs.top && bottom >= rhs.bottom);
}
/// Expands the bounds of the rectangle to contain the specified point.
constexpr void Include(T x, T y)