mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 09:45:46 +00:00
video_core: Reintroduce dirty flags infrastructure
This commit is contained in:
parent
02ae826edd
commit
005f5ca883
10 changed files with 72 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <array>
|
||||
#include <bitset>
|
||||
#include <limits>
|
||||
#include <optional>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
|
@ -1274,6 +1275,13 @@ public:
|
|||
return execute_on;
|
||||
}
|
||||
|
||||
/// Notify a memory write has happened.
|
||||
void OnMemoryWrite() {
|
||||
for (const u8 store : dirty.on_write_stores) {
|
||||
dirty.flags[store] = true;
|
||||
}
|
||||
}
|
||||
|
||||
enum class MMEDrawMode : u32 {
|
||||
Undefined,
|
||||
Array,
|
||||
|
@ -1289,6 +1297,12 @@ public:
|
|||
u32 gl_end_count{};
|
||||
} mme_draw;
|
||||
|
||||
struct {
|
||||
std::bitset<std::numeric_limits<u8>::max()> flags;
|
||||
std::array<std::array<u8, Regs::NUM_REGS>, 3> tables{};
|
||||
std::array<u8, 32> on_write_stores{};
|
||||
} dirty;
|
||||
|
||||
private:
|
||||
void InitializeRegisterDefaults();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue