diff options
Diffstat (limited to 'src/video_core/engines')
-rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 10 | ||||
-rw-r--r-- | src/video_core/engines/maxwell_3d.h | 4 |
2 files changed, 13 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: diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 59d5752d2..0a93827ec 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -1427,6 +1427,8 @@ public: Tables tables{}; } dirty; + void ReleaseFences(); + private: void InitializeRegisterDefaults(); @@ -1467,6 +1469,8 @@ private: std::array<u8, Regs::NUM_REGS> dirty_pointers{}; + std::vector<std::pair<GPUVAddr, u64>> delay_fences; + /// Retrieves information about a specific TIC entry from the TIC buffer. Texture::TICEntry GetTICEntry(u32 tic_index) const; |