summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-07-26 20:20:43 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-07-26 22:54:22 +0200
commite52c8955595c5e3e9e88180847c8eff71356a0c2 (patch)
tree455f64cda5b55086ca10d8841d8b4a77ae900276 /src/video_core
parentMerge pull request #2592 from FernandoS27/sync1 (diff)
downloadyuzu-e52c8955595c5e3e9e88180847c8eff71356a0c2.tar
yuzu-e52c8955595c5e3e9e88180847c8eff71356a0c2.tar.gz
yuzu-e52c8955595c5e3e9e88180847c8eff71356a0c2.tar.bz2
yuzu-e52c8955595c5e3e9e88180847c8eff71356a0c2.tar.lz
yuzu-e52c8955595c5e3e9e88180847c8eff71356a0c2.tar.xz
yuzu-e52c8955595c5e3e9e88180847c8eff71356a0c2.tar.zst
yuzu-e52c8955595c5e3e9e88180847c8eff71356a0c2.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/dma_pusher.cpp1
-rw-r--r--src/video_core/gpu.cpp4
-rw-r--r--src/video_core/gpu.h2
-rw-r--r--src/video_core/rasterizer_interface.h3
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h1
6 files changed, 15 insertions, 0 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp
index bd036cbe8..0094fd715 100644
--- a/src/video_core/dma_pusher.cpp
+++ b/src/video_core/dma_pusher.cpp
@@ -31,6 +31,7 @@ void DmaPusher::DispatchCalls() {
break;
}
}
+ gpu.FlushCommands();
}
bool DmaPusher::Step() {
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index 1622332a4..c409af194 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -120,6 +120,10 @@ bool GPU::CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value) {
return true;
}
+void GPU::FlushCommands() {
+ renderer.Rasterizer().FlushCommands();
+}
+
u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {
ASSERT(format != RenderTargetFormat::NONE);
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 87c96f46b..11857ff99 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -153,6 +153,8 @@ public:
/// Calls a GPU method.
void CallMethod(const MethodCall& method_call);
+ void FlushCommands();
+
/// Returns a reference to the Maxwell3D GPU engine.
Engines::Maxwell3D& Maxwell3D();
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h
index 9881df0d5..6e44d51cf 100644
--- a/src/video_core/rasterizer_interface.h
+++ b/src/video_core/rasterizer_interface.h
@@ -50,6 +50,9 @@ public:
/// and invalidated
virtual void FlushAndInvalidateRegion(CacheAddr addr, u64 size) = 0;
+ // Notify the rasterizer to send all written commands to the host GPU.
+ virtual void FlushCommands() = 0;
+
/// Notify rasterizer that a frame is about to finish
virtual void TickFrame() = 0;
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index c28ae795c..80cfda7e4 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -863,6 +863,10 @@ void RasterizerOpenGL::FlushAndInvalidateRegion(CacheAddr addr, u64 size) {
InvalidateRegion(addr, size);
}
+void RasterizerOpenGL::FlushCommands() {
+ glFlush();
+}
+
void RasterizerOpenGL::TickFrame() {
buffer_cache.TickFrame();
}
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index 8b123c48d..9d20a4fbf 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -63,6 +63,7 @@ public:
void FlushRegion(CacheAddr addr, u64 size) override;
void InvalidateRegion(CacheAddr addr, u64 size) override;
void FlushAndInvalidateRegion(CacheAddr addr, u64 size) override;
+ void FlushCommands() override;
void TickFrame() override;
bool AccelerateSurfaceCopy(const Tegra::Engines::Fermi2D::Regs::Surface& src,
const Tegra::Engines::Fermi2D::Regs::Surface& dst,