mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 03:32:55 +00:00
Savestates: save sys_spu_initialize settings
This commit is contained in:
parent
845af8bd96
commit
12ebf77e22
@ -347,9 +347,6 @@ std::pair<named_thread<spu_thread>*, std::shared_ptr<lv2_spu_group>> lv2_spu_gro
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
|
|
||||||
struct limits_data
|
struct limits_data
|
||||||
{
|
{
|
||||||
u32 physical = 0;
|
u32 physical = 0;
|
||||||
@ -365,6 +362,23 @@ struct spu_limits_t
|
|||||||
u32 max_spu = 6;
|
u32 max_spu = 6;
|
||||||
shared_mutex mutex;
|
shared_mutex mutex;
|
||||||
|
|
||||||
|
spu_limits_t() = default;
|
||||||
|
|
||||||
|
spu_limits_t(utils::serial& ar) noexcept
|
||||||
|
{
|
||||||
|
if (GET_SERIALIZATION_VERSION(spu) >= 2)
|
||||||
|
{
|
||||||
|
ar(max_raw, max_spu);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void save(utils::serial& ar)
|
||||||
|
{
|
||||||
|
ar(max_raw, max_spu);
|
||||||
|
}
|
||||||
|
|
||||||
|
SAVESTATE_INIT_POS(47);
|
||||||
|
|
||||||
bool check(const limits_data& init) const
|
bool check(const limits_data& init) const
|
||||||
{
|
{
|
||||||
u32 physical_spus_count = init.physical;
|
u32 physical_spus_count = init.physical;
|
||||||
@ -396,8 +410,6 @@ struct spu_limits_t
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // annonymous namespace
|
|
||||||
|
|
||||||
error_code sys_spu_initialize(ppu_thread& ppu, u32 max_usable_spu, u32 max_raw_spu)
|
error_code sys_spu_initialize(ppu_thread& ppu, u32 max_usable_spu, u32 max_raw_spu)
|
||||||
{
|
{
|
||||||
ppu.state += cpu_flag::wait;
|
ppu.state += cpu_flag::wait;
|
||||||
|
@ -37,7 +37,7 @@ static std::array<serial_ver_t, 23> s_serial_versions;
|
|||||||
|
|
||||||
SERIALIZATION_VER(global_version, 0, 12) // For stuff not listed here
|
SERIALIZATION_VER(global_version, 0, 12) // For stuff not listed here
|
||||||
SERIALIZATION_VER(ppu, 1, 1)
|
SERIALIZATION_VER(ppu, 1, 1)
|
||||||
SERIALIZATION_VER(spu, 2, 1)
|
SERIALIZATION_VER(spu, 2, 1, 2 /*spu_limits_t ctor*/)
|
||||||
SERIALIZATION_VER(lv2_sync, 3, 1)
|
SERIALIZATION_VER(lv2_sync, 3, 1)
|
||||||
SERIALIZATION_VER(lv2_vm, 4, 1)
|
SERIALIZATION_VER(lv2_vm, 4, 1)
|
||||||
SERIALIZATION_VER(lv2_net, 5, 1)
|
SERIALIZATION_VER(lv2_net, 5, 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user