mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 05:21:25 +12:00
rsx: Implement framebuffer statistics to track the internal render resolution at runtime.
This commit is contained in:
parent
0f3d2c7085
commit
10d5907f46
9 changed files with 179 additions and 3 deletions
|
@ -404,18 +404,19 @@ namespace rsx
|
|||
return ret;
|
||||
}
|
||||
|
||||
void sort(std::predicate<const Ty&, const Ty&> auto predicate)
|
||||
simple_array<Ty>& sort(std::predicate<const Ty&, const Ty&> auto predicate)
|
||||
{
|
||||
if (_size < 2)
|
||||
{
|
||||
return;
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::sort(begin(), end(), predicate);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename F, typename U = std::invoke_result_t<F, const Ty&>>
|
||||
requires std::is_invocable_v<F, const Ty&>
|
||||
requires (std::is_invocable_v<F, const Ty&> && std::is_trivially_destructible_v<U>)
|
||||
simple_array<U> map(F&& xform) const
|
||||
{
|
||||
simple_array<U> result;
|
||||
|
@ -428,6 +429,20 @@ namespace rsx
|
|||
return result;
|
||||
}
|
||||
|
||||
template <typename F, typename U = std::invoke_result_t<F, const Ty&>>
|
||||
requires (std::is_invocable_v<F, const Ty&> && !std::is_trivially_destructible_v<U>)
|
||||
std::vector<U> map(F&& xform) const
|
||||
{
|
||||
std::vector<U> result;
|
||||
result.reserve(size());
|
||||
|
||||
for (auto it = begin(); it != end(); ++it)
|
||||
{
|
||||
result.push_back(xform(*it));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename F, typename U>
|
||||
requires std::is_invocable_r_v<U, F, const U&, const Ty&>
|
||||
U reduce(U initial_value, F&& reducer) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue