diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-05 12:43:28 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-05 12:43:28 +0100 |
commit | 2d0c4f2b1d8a069754725a2fb3597a7506e265a5 (patch) | |
tree | 8699ddfa768c2eb61e920912b92823b2352cbfc0 /src/video_core/engines | |
parent | MemoryManager: use fastmem directly. (diff) | |
download | yuzu-2d0c4f2b1d8a069754725a2fb3597a7506e265a5.tar yuzu-2d0c4f2b1d8a069754725a2fb3597a7506e265a5.tar.gz yuzu-2d0c4f2b1d8a069754725a2fb3597a7506e265a5.tar.bz2 yuzu-2d0c4f2b1d8a069754725a2fb3597a7506e265a5.tar.lz yuzu-2d0c4f2b1d8a069754725a2fb3597a7506e265a5.tar.xz yuzu-2d0c4f2b1d8a069754725a2fb3597a7506e265a5.tar.zst yuzu-2d0c4f2b1d8a069754725a2fb3597a7506e265a5.zip |
Diffstat (limited to 'src/video_core/engines')
-rw-r--r-- | src/video_core/engines/fermi_2d.cpp | 6 | ||||
-rw-r--r-- | src/video_core/engines/fermi_2d.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index e655e7254..a126c359c 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp @@ -6,6 +6,7 @@ #include "common/microprofile.h" #include "video_core/engines/fermi_2d.h" #include "video_core/engines/sw_blitter/blitter.h" +#include "video_core/memory_manager.h" #include "video_core/rasterizer_interface.h" #include "video_core/surface.h" #include "video_core/textures/decoders.h" @@ -20,8 +21,8 @@ namespace Tegra::Engines { using namespace Texture; -Fermi2D::Fermi2D(MemoryManager& memory_manager_) { - sw_blitter = std::make_unique<Blitter::SoftwareBlitEngine>(memory_manager_); +Fermi2D::Fermi2D(MemoryManager& memory_manager_) : memory_manager{memory_manager_} { + sw_blitter = std::make_unique<Blitter::SoftwareBlitEngine>(memory_manager); // Nvidia's OpenGL driver seems to assume these values regs.src.depth = 1; regs.dst.depth = 1; @@ -104,6 +105,7 @@ void Fermi2D::Blit() { config.src_x0 = 0; } + memory_manager.FlushCaching(); if (!rasterizer->AccelerateSurfaceCopy(src, regs.dst, config)) { sw_blitter->Blit(src, regs.dst, config); } diff --git a/src/video_core/engines/fermi_2d.h b/src/video_core/engines/fermi_2d.h index 523fbdec2..705b323e1 100644 --- a/src/video_core/engines/fermi_2d.h +++ b/src/video_core/engines/fermi_2d.h @@ -305,6 +305,7 @@ public: private: VideoCore::RasterizerInterface* rasterizer = nullptr; std::unique_ptr<Blitter::SoftwareBlitEngine> sw_blitter; + MemoryManager& memory_manager; /// Performs the copy from the source surface to the destination surface as configured in the /// registers. |