diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-07-10 18:19:10 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-07-11 01:33:17 +0200 |
commit | be1a3f7a0fb330b7cc5ac007ccb2cb73d4795602 (patch) | |
tree | 1e32f15d4c4ad9917c6fc86ddad53fdd85603859 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #6557 from FernandoS27/staceys-mom-has-got-it-goin-on (diff) | |
download | yuzu-be1a3f7a0fb330b7cc5ac007ccb2cb73d4795602.tar yuzu-be1a3f7a0fb330b7cc5ac007ccb2cb73d4795602.tar.gz yuzu-be1a3f7a0fb330b7cc5ac007ccb2cb73d4795602.tar.bz2 yuzu-be1a3f7a0fb330b7cc5ac007ccb2cb73d4795602.tar.lz yuzu-be1a3f7a0fb330b7cc5ac007ccb2cb73d4795602.tar.xz yuzu-be1a3f7a0fb330b7cc5ac007ccb2cb73d4795602.tar.zst yuzu-be1a3f7a0fb330b7cc5ac007ccb2cb73d4795602.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index a4ed8f68f..82c84127a 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -171,7 +171,7 @@ RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& emu_window_, Tegra buffer_cache_runtime(device), buffer_cache(*this, maxwell3d, kepler_compute, gpu_memory, cpu_memory_, buffer_cache_runtime), shader_cache(*this, emu_window_, gpu, maxwell3d, kepler_compute, gpu_memory, device), - query_cache(*this, maxwell3d, gpu_memory), + query_cache(*this, maxwell3d, gpu_memory), accelerate_dma(buffer_cache), fence_manager(*this, gpu, texture_cache, buffer_cache, query_cache), async_shaders(emu_window_) { if (device.UseAsynchronousShaders()) { @@ -701,6 +701,10 @@ bool RasterizerOpenGL::AccelerateSurfaceCopy(const Tegra::Engines::Fermi2D::Surf return true; } +Tegra::Engines::AccelerateDMAInterface& RasterizerOpenGL::AccessAccelerateDMA() { + return accelerate_dma; +} + bool RasterizerOpenGL::AccelerateDisplay(const Tegra::FramebufferConfig& config, VAddr framebuffer_addr, u32 pixel_stride) { if (framebuffer_addr == 0) { @@ -1396,4 +1400,11 @@ void RasterizerOpenGL::EndTransformFeedback() { glEndTransformFeedback(); } +AccelerateDMA::AccelerateDMA(BufferCache& buffer_cache_) : buffer_cache{buffer_cache_} {} + +bool AccelerateDMA::BufferCopy(GPUVAddr src_address, GPUVAddr dest_address, u64 amount) { + std::scoped_lock lock{buffer_cache.mutex}; + return buffer_cache.DMACopy(src_address, dest_address, amount); +} + } // namespace OpenGL |