summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/engines/maxwell_3d.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index b0fb0fb7d..72848b1e8 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -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();