summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-11-17 16:36:53 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-01-01 22:43:57 +0100
commit18637766efd1ff9a0c22967553983cfda69c96ca (patch)
tree142d4cab2de27ce250d246f0355fec97748a7bcf /src/video_core/engines
parentMacroHLE: Add HLE replacement for base vertex and base instance. (diff)
downloadyuzu-18637766efd1ff9a0c22967553983cfda69c96ca.tar
yuzu-18637766efd1ff9a0c22967553983cfda69c96ca.tar.gz
yuzu-18637766efd1ff9a0c22967553983cfda69c96ca.tar.bz2
yuzu-18637766efd1ff9a0c22967553983cfda69c96ca.tar.lz
yuzu-18637766efd1ff9a0c22967553983cfda69c96ca.tar.xz
yuzu-18637766efd1ff9a0c22967553983cfda69c96ca.tar.zst
yuzu-18637766efd1ff9a0c22967553983cfda69c96ca.zip
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp15
-rw-r--r--src/video_core/engines/maxwell_3d.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 50d8a94b1..a9fd6d960 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -157,6 +157,21 @@ void Maxwell3D::RefreshParameters() {
}
}
+bool Maxwell3D::AnyParametersDirty() {
+ size_t current_index = 0;
+ for (auto& segment : macro_segments) {
+ if (segment.first == 0) {
+ current_index += segment.second;
+ continue;
+ }
+ if (memory_manager.IsMemoryDirty(segment.first, sizeof(u32) * segment.second)) {
+ return true;
+ }
+ current_index += segment.second;
+ }
+ return false;
+}
+
u32 Maxwell3D::GetMaxCurrentVertices() {
u32 num_vertices = 0;
for (size_t index = 0; index < Regs::NumVertexArrays; ++index) {
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 397e88f67..cd996413c 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -3092,6 +3092,8 @@ public:
void RefreshParameters();
+ bool AnyParametersDirty();
+
u32 GetMaxCurrentVertices();
size_t EstimateIndexBufferSize();