aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/engines/fermi_2d.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-26 18:33:22 -0500
committerGitHub <noreply@github.com>2018-11-26 18:33:22 -0500
commit67a154e23da149da29e6bd04ce2fb95f3eb7675a (patch)
tree914026c2130ca51f929127e470608109890ba0a9 /src/video_core/engines/fermi_2d.cpp
parentcb8d51e37e7d630f1ea3dc816b2d5aaab2295bc2 (diff)
parent97f5c4ffd3950994b852b287e1d24f4766e53bea (diff)
Merge pull request #1723 from degasus/dirty_flags
gl_rasterizer: Skip VB upload if the state is clean.
Diffstat (limited to 'src/video_core/engines/fermi_2d.cpp')
-rw-r--r--src/video_core/engines/fermi_2d.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp
index 74e44c7fe..8d0700d13 100644
--- a/src/video_core/engines/fermi_2d.cpp
+++ b/src/video_core/engines/fermi_2d.cpp
@@ -2,8 +2,10 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include "core/core.h"
#include "core/memory.h"
#include "video_core/engines/fermi_2d.h"
+#include "video_core/engines/maxwell_3d.h"
#include "video_core/rasterizer_interface.h"
#include "video_core/textures/decoders.h"
@@ -47,6 +49,9 @@ void Fermi2D::HandleSurfaceCopy() {
u32 dst_bytes_per_pixel = RenderTargetBytesPerPixel(regs.dst.format);
if (!rasterizer.AccelerateSurfaceCopy(regs.src, regs.dst)) {
+ // All copies here update the main memory, so mark all rasterizer states as invalid.
+ Core::System::GetInstance().GPU().Maxwell3D().dirty_flags.OnMemoryWrite();
+
rasterizer.FlushRegion(source_cpu, src_bytes_per_pixel * regs.src.width * regs.src.height);
// We have to invalidate the destination region to evict any outdated surfaces from the
// cache. We do this before actually writing the new data because the destination address