ThreadManager: Sync async reads on accurate gpu.

This commit is contained in:
Fernando Sahmkow 2020-02-17 22:29:04 -04:00
parent 10dcdb2ed9
commit e7195b5f87
9 changed files with 48 additions and 8 deletions
src/video_core

View file

@ -6,6 +6,7 @@
#include "common/microprofile.h"
#include "core/core.h"
#include "core/frontend/emu_window.h"
#include "core/settings.h"
#include "video_core/dma_pusher.h"
#include "video_core/gpu.h"
#include "video_core/gpu_thread.h"
@ -80,7 +81,11 @@ void ThreadManager::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
}
void ThreadManager::FlushRegion(VAddr addr, u64 size) {
PushCommand(FlushRegionCommand(addr, size));
if (system.Renderer().Rasterizer().MustFlushRegion(addr, size)) {
u64 fence = PushCommand(FlushRegionCommand(addr, size));
while (fence < state.signaled_fence.load(std::memory_order_relaxed)) {
}
}
}
void ThreadManager::InvalidateRegion(VAddr addr, u64 size) {