mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-04-07 00:51:29 -06:00
video_core: Make all state dirty after loading a savestate
This commit is contained in:
parent
b0fea112e8
commit
13071868da
@ -16,6 +16,10 @@ union DirtyRegs {
|
||||
qwords[reg_id >> 6] |= 1ULL << (reg_id & 0x3f);
|
||||
}
|
||||
|
||||
void SetAllDirty() {
|
||||
qwords.fill(UINT64_MAX);
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
qwords.fill(0ULL);
|
||||
}
|
||||
|
||||
@ -35,6 +35,7 @@ PicaCore::PicaCore(Memory::MemorySystem& memory_, std::shared_ptr<DebugContext>
|
||||
geometry_pipeline{regs.internal, gs_unit, gs_setup},
|
||||
shader_engine{CreateEngine(Settings::values.use_shader_jit.GetValue())} {
|
||||
InitializeRegs();
|
||||
dirty_regs.SetAllDirty();
|
||||
|
||||
const auto submit_vertex = [this](const AttributeBuffer& buffer) {
|
||||
const auto add_triangle = [this](const OutputVertex& v0, const OutputVertex& v1,
|
||||
|
||||
@ -185,6 +185,9 @@ public:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const u32 file_version) {
|
||||
ar& boost::serialization::make_binary_object(this, sizeof(ProcTex));
|
||||
if (Archive::is_loading::value) {
|
||||
table_dirty = TableAllDirty;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -225,6 +228,9 @@ public:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const u32 file_version) {
|
||||
ar& boost::serialization::make_binary_object(this, sizeof(Lighting));
|
||||
if (Archive::is_loading::value) {
|
||||
lut_dirty = LutAllDirty;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -253,6 +259,9 @@ public:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const u32 file_version) {
|
||||
ar& boost::serialization::make_binary_object(this, sizeof(Fog));
|
||||
if (Archive::is_loading::value) {
|
||||
lut_dirty = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -285,6 +294,9 @@ private:
|
||||
ar & geometry_pipeline;
|
||||
ar & primitive_assembler;
|
||||
ar & cmd_list;
|
||||
if (Archive::is_loading::value) {
|
||||
dirty_regs.SetAllDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
@ -168,6 +168,9 @@ private:
|
||||
ar & swizzle_data_hash;
|
||||
ar & requires_fixup;
|
||||
ar & has_fixup;
|
||||
if (Archive::is_loading::value) {
|
||||
uniforms_dirty = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user