summaryrefslogtreecommitdiffstats
path: root/src/video_core/dirty_flags.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-02-21 05:56:00 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-02-28 21:56:43 +0100
commitac204754d4fe2aaae214025d8f1f40bcb938d74f (patch)
tree2d22f37fa52eda5fd66d7420e2c4c674c7b863c1 /src/video_core/dirty_flags.h
parentvk_rasterizer: Pass Maxwell registers to dynamic updates (diff)
downloadyuzu-ac204754d4fe2aaae214025d8f1f40bcb938d74f.tar
yuzu-ac204754d4fe2aaae214025d8f1f40bcb938d74f.tar.gz
yuzu-ac204754d4fe2aaae214025d8f1f40bcb938d74f.tar.bz2
yuzu-ac204754d4fe2aaae214025d8f1f40bcb938d74f.tar.lz
yuzu-ac204754d4fe2aaae214025d8f1f40bcb938d74f.tar.xz
yuzu-ac204754d4fe2aaae214025d8f1f40bcb938d74f.tar.zst
yuzu-ac204754d4fe2aaae214025d8f1f40bcb938d74f.zip
Diffstat (limited to 'src/video_core/dirty_flags.h')
-rw-r--r--src/video_core/dirty_flags.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/video_core/dirty_flags.h b/src/video_core/dirty_flags.h
index d9058bcab..ed07dfc03 100644
--- a/src/video_core/dirty_flags.h
+++ b/src/video_core/dirty_flags.h
@@ -4,7 +4,12 @@
#pragma once
+#include <algorithm>
+#include <cstddef>
+#include <iterator>
+
#include "common/common_types.h"
+#include "video_core/engines/maxwell_3d.h"
namespace VideoCommon::Dirty {
@@ -25,4 +30,22 @@ enum : u8 {
LastCommonEntry,
};
+template <typename Integer>
+inline void FillBlock(Tegra::Engines::Maxwell3D::DirtyState::Table& table, std::size_t begin,
+ std::size_t num, Integer dirty_index) {
+ const auto it = std::begin(table) + begin;
+ std::fill(it, it + num, static_cast<u8>(dirty_index));
+}
+
+template <typename Integer1, typename Integer2>
+inline void FillBlock(Tegra::Engines::Maxwell3D::DirtyState::Tables& tables, std::size_t begin,
+ std::size_t num, Integer1 index_a, Integer2 index_b) {
+ FillBlock(tables[0], begin, num, index_a);
+ FillBlock(tables[1], begin, num, index_b);
+}
+
+void SetupCommonOnWriteStores(Tegra::Engines::Maxwell3D::DirtyState::Flags& store);
+
+void SetupDirtyRenderTargets(Tegra::Engines::Maxwell3D::DirtyState::Tables& tables);
+
} // namespace VideoCommon::Dirty