diff options
author | Markus Wick <markus@selfnet.de> | 2018-11-06 21:26:27 +0100 |
---|---|---|
committer | Markus Wick <markus@selfnet.de> | 2018-11-17 14:28:54 +0100 |
commit | 97f5c4ffd3950994b852b287e1d24f4766e53bea (patch) | |
tree | d2e2bc62afd33c68f5a601705782b26fbbb4f35f /src/video_core/engines/fermi_2d.cpp | |
parent | Merge pull request #1678 from FearlessTobi/amiibo-hotkeys (diff) | |
download | yuzu-97f5c4ffd3950994b852b287e1d24f4766e53bea.tar yuzu-97f5c4ffd3950994b852b287e1d24f4766e53bea.tar.gz yuzu-97f5c4ffd3950994b852b287e1d24f4766e53bea.tar.bz2 yuzu-97f5c4ffd3950994b852b287e1d24f4766e53bea.tar.lz yuzu-97f5c4ffd3950994b852b287e1d24f4766e53bea.tar.xz yuzu-97f5c4ffd3950994b852b287e1d24f4766e53bea.tar.zst yuzu-97f5c4ffd3950994b852b287e1d24f4766e53bea.zip |
Diffstat (limited to 'src/video_core/engines/fermi_2d.cpp')
-rw-r--r-- | src/video_core/engines/fermi_2d.cpp | 5 |
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 |