diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-02-07 07:52:04 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-10-06 21:00:53 +0200 |
commit | a9ca39f8591532ba6d37f7a3e068d5eefe416464 (patch) | |
tree | 0c469d2c853592c7f23095bfea40784fed471ae9 /src/video_core/engines/maxwell_dma.cpp | |
parent | Buffer Cache: Basic fixes. (diff) | |
download | yuzu-a9ca39f8591532ba6d37f7a3e068d5eefe416464.tar yuzu-a9ca39f8591532ba6d37f7a3e068d5eefe416464.tar.gz yuzu-a9ca39f8591532ba6d37f7a3e068d5eefe416464.tar.bz2 yuzu-a9ca39f8591532ba6d37f7a3e068d5eefe416464.tar.lz yuzu-a9ca39f8591532ba6d37f7a3e068d5eefe416464.tar.xz yuzu-a9ca39f8591532ba6d37f7a3e068d5eefe416464.tar.zst yuzu-a9ca39f8591532ba6d37f7a3e068d5eefe416464.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/engines/maxwell_dma.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index a12a95ce2..bcffd1862 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -274,16 +274,24 @@ void MaxwellDMA::FastCopyBlockLinearToPitch() { void MaxwellDMA::ReleaseSemaphore() { const auto type = regs.launch_dma.semaphore_type; const GPUVAddr address = regs.semaphore.address; + const u32 payload = regs.semaphore.payload; switch (type) { case LaunchDMA::SemaphoreType::NONE: break; - case LaunchDMA::SemaphoreType::RELEASE_ONE_WORD_SEMAPHORE: - memory_manager.Write<u32>(address, regs.semaphore.payload); + case LaunchDMA::SemaphoreType::RELEASE_ONE_WORD_SEMAPHORE: { + std::function<void()> operation( + [this, address, payload] { memory_manager.Write<u32>(address, payload); }); + rasterizer->SignalFence(std::move(operation)); break; - case LaunchDMA::SemaphoreType::RELEASE_FOUR_WORD_SEMAPHORE: - memory_manager.Write<u64>(address, static_cast<u64>(regs.semaphore.payload)); - memory_manager.Write<u64>(address + 8, system.GPU().GetTicks()); + } + case LaunchDMA::SemaphoreType::RELEASE_FOUR_WORD_SEMAPHORE: { + std::function<void()> operation([this, address, payload] { + memory_manager.Write<u64>(address + sizeof(u64), system.GPU().GetTicks()); + memory_manager.Write<u64>(address, payload); + }); + rasterizer->SignalFence(std::move(operation)); break; + } default: ASSERT_MSG(false, "Unknown semaphore type: {}", static_cast<u32>(type.Value())); } |