summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-16 21:24:37 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-22 17:36:08 +0200
commit339d0d9d6c02cf79d6025dae7c60d8635fa4ea3b (patch)
treec9a583f3a581fd52cef4d77c2c82d4d9a1e9c1fe /src/video_core/engines/maxwell_3d.cpp
parentBufferCache: Implement OnCPUWrite and SyncGuestHost (diff)
downloadyuzu-339d0d9d6c02cf79d6025dae7c60d8635fa4ea3b.tar
yuzu-339d0d9d6c02cf79d6025dae7c60d8635fa4ea3b.tar.gz
yuzu-339d0d9d6c02cf79d6025dae7c60d8635fa4ea3b.tar.bz2
yuzu-339d0d9d6c02cf79d6025dae7c60d8635fa4ea3b.tar.lz
yuzu-339d0d9d6c02cf79d6025dae7c60d8635fa4ea3b.tar.xz
yuzu-339d0d9d6c02cf79d6025dae7c60d8635fa4ea3b.tar.zst
yuzu-339d0d9d6c02cf79d6025dae7c60d8635fa4ea3b.zip
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 2298a6273..2605c3b42 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -397,6 +397,14 @@ void Maxwell3D::StampQueryResult(u64 payload, bool long_query) {
}
}
+void Maxwell3D::ReleaseFences() {
+ for (const auto pair : delay_fences) {
+ const auto [addr, payload] = pair;
+ memory_manager.Write<u32>(addr, static_cast<u32>(payload));
+ }
+ delay_fences.clear();
+}
+
void Maxwell3D::ProcessQueryGet() {
// TODO(Subv): Support the other query units.
ASSERT_MSG(regs.query.query_get.unit == Regs::QueryUnit::Crop,
@@ -407,7 +415,7 @@ void Maxwell3D::ProcessQueryGet() {
rasterizer.FlushCommands();
rasterizer.SyncGuestHost();
const u64 result = regs.query.query_sequence;
- StampQueryResult(result, regs.query.query_get.short_query == 0);
+ delay_fences.emplace_back(regs.query.QueryAddress(), result);
break;
}
case Regs::QueryOperation::Acquire: