summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-18 16:26:31 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-22 17:36:12 +0200
commite84eb64e511cd4699cc2371744fccd24628c0749 (patch)
tree43a80c0ecc15f781cf5fdba70deaaa46260683ec /src
parentThreadManager: Sync async reads on accurate gpu. (diff)
downloadyuzu-e84eb64e511cd4699cc2371744fccd24628c0749.tar
yuzu-e84eb64e511cd4699cc2371744fccd24628c0749.tar.gz
yuzu-e84eb64e511cd4699cc2371744fccd24628c0749.tar.bz2
yuzu-e84eb64e511cd4699cc2371744fccd24628c0749.tar.lz
yuzu-e84eb64e511cd4699cc2371744fccd24628c0749.tar.xz
yuzu-e84eb64e511cd4699cc2371744fccd24628c0749.tar.zst
yuzu-e84eb64e511cd4699cc2371744fccd24628c0749.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp10
-rw-r--r--src/video_core/texture_cache/texture_cache.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index bbf37a00d..ffa0a0429 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -682,10 +682,20 @@ void RasterizerOpenGL::SyncGuestHost() {
}
void RasterizerOpenGL::SignalFence(GPUVAddr addr, u32 value) {
+ auto& gpu{system.GPU()};
+ if (!gpu.IsAsync()) {
+ auto& memory_manager{gpu.MemoryManager()};
+ memory_manager.Write<u32>(addr, value);
+ return;
+ }
fence_manager.SignalFence(addr, value);
}
void RasterizerOpenGL::ReleaseFences() {
+ auto& gpu{system.GPU()};
+ if (!gpu.IsAsync()) {
+ return;
+ }
fence_manager.WaitPendingFences();
}
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index e251a30c3..e1a1edbd2 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -252,7 +252,7 @@ public:
auto& surface = render_targets[index].target;
surface->MarkAsRenderTarget(false, NO_RT);
const auto& cr_params = surface->GetSurfaceParams();
- if (!cr_params.is_tiled) {
+ if (!cr_params.is_tiled && Settings::values.use_asynchronous_gpu_emulation) {
AsyncFlushSurface(surface);
}
}