diff options
Diffstat (limited to 'src')
| -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 @@ | |||
| 6 | #include "common/microprofile.h" | 6 | #include "common/microprofile.h" |
| 7 | #include "video_core/engines/fermi_2d.h" | 7 | #include "video_core/engines/fermi_2d.h" |
| 8 | #include "video_core/engines/sw_blitter/blitter.h" | 8 | #include "video_core/engines/sw_blitter/blitter.h" |
| 9 | #include "video_core/memory_manager.h" | ||
| 9 | #include "video_core/rasterizer_interface.h" | 10 | #include "video_core/rasterizer_interface.h" |
| 10 | #include "video_core/surface.h" | 11 | #include "video_core/surface.h" |
| 11 | #include "video_core/textures/decoders.h" | 12 | #include "video_core/textures/decoders.h" |
| @@ -20,8 +21,8 @@ namespace Tegra::Engines { | |||
| 20 | 21 | ||
| 21 | using namespace Texture; | 22 | using namespace Texture; |
| 22 | 23 | ||
| 23 | Fermi2D::Fermi2D(MemoryManager& memory_manager_) { | 24 | Fermi2D::Fermi2D(MemoryManager& memory_manager_) : memory_manager{memory_manager_} { |
| 24 | sw_blitter = std::make_unique<Blitter::SoftwareBlitEngine>(memory_manager_); | 25 | sw_blitter = std::make_unique<Blitter::SoftwareBlitEngine>(memory_manager); |
| 25 | // Nvidia's OpenGL driver seems to assume these values | 26 | // Nvidia's OpenGL driver seems to assume these values |
| 26 | regs.src.depth = 1; | 27 | regs.src.depth = 1; |
| 27 | regs.dst.depth = 1; | 28 | regs.dst.depth = 1; |
| @@ -104,6 +105,7 @@ void Fermi2D::Blit() { | |||
| 104 | config.src_x0 = 0; | 105 | config.src_x0 = 0; |
| 105 | } | 106 | } |
| 106 | 107 | ||
| 108 | memory_manager.FlushCaching(); | ||
| 107 | if (!rasterizer->AccelerateSurfaceCopy(src, regs.dst, config)) { | 109 | if (!rasterizer->AccelerateSurfaceCopy(src, regs.dst, config)) { |
| 108 | sw_blitter->Blit(src, regs.dst, config); | 110 | sw_blitter->Blit(src, regs.dst, config); |
| 109 | } | 111 | } |
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: | |||
| 305 | private: | 305 | private: |
| 306 | VideoCore::RasterizerInterface* rasterizer = nullptr; | 306 | VideoCore::RasterizerInterface* rasterizer = nullptr; |
| 307 | std::unique_ptr<Blitter::SoftwareBlitEngine> sw_blitter; | 307 | std::unique_ptr<Blitter::SoftwareBlitEngine> sw_blitter; |
| 308 | MemoryManager& memory_manager; | ||
| 308 | 309 | ||
| 309 | /// Performs the copy from the source surface to the destination surface as configured in the | 310 | /// Performs the copy from the source surface to the destination surface as configured in the |
| 310 | /// registers. | 311 | /// registers. |