diff options
| author | 2019-11-26 15:19:15 -0500 | |
|---|---|---|
| committer | 2019-11-26 21:55:38 -0500 | |
| commit | 3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef (patch) | |
| tree | 0e13cc5e2595d7019f8e9e80fe0279dc6a2b1d4c /src/video_core/renderer_opengl | |
| parent | core: Prepare various classes for memory read/write migration (diff) | |
| download | yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.gz yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.xz yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.zip | |
core/memory: Migrate over GetPointer()
With all of the interfaces ready for migration, it's trivial to migrate
over GetPointer().
Diffstat (limited to 'src/video_core/renderer_opengl')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 85f05544c..a568a4343 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include "common/scope_exit.h" | 19 | #include "common/scope_exit.h" |
| 20 | #include "core/core.h" | 20 | #include "core/core.h" |
| 21 | #include "core/hle/kernel/process.h" | 21 | #include "core/hle/kernel/process.h" |
| 22 | #include "core/memory.h" | ||
| 22 | #include "core/settings.h" | 23 | #include "core/settings.h" |
| 23 | #include "video_core/engines/kepler_compute.h" | 24 | #include "video_core/engines/kepler_compute.h" |
| 24 | #include "video_core/engines/maxwell_3d.h" | 25 | #include "video_core/engines/maxwell_3d.h" |
| @@ -838,7 +839,7 @@ bool RasterizerOpenGL::AccelerateDisplay(const Tegra::FramebufferConfig& config, | |||
| 838 | MICROPROFILE_SCOPE(OpenGL_CacheManagement); | 839 | MICROPROFILE_SCOPE(OpenGL_CacheManagement); |
| 839 | 840 | ||
| 840 | const auto surface{ | 841 | const auto surface{ |
| 841 | texture_cache.TryFindFramebufferSurface(Memory::GetPointer(framebuffer_addr))}; | 842 | texture_cache.TryFindFramebufferSurface(system.Memory().GetPointer(framebuffer_addr))}; |
| 842 | if (!surface) { | 843 | if (!surface) { |
| 843 | return {}; | 844 | return {}; |
| 844 | } | 845 | } |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 7646cbb0e..a57a564f7 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -158,7 +158,7 @@ void RendererOpenGL::LoadFBToScreenInfo(const Tegra::FramebufferConfig& framebuf | |||
| 158 | VideoCore::Surface::PixelFormatFromGPUPixelFormat(framebuffer.pixel_format)}; | 158 | VideoCore::Surface::PixelFormatFromGPUPixelFormat(framebuffer.pixel_format)}; |
| 159 | const u32 bytes_per_pixel{VideoCore::Surface::GetBytesPerPixel(pixel_format)}; | 159 | const u32 bytes_per_pixel{VideoCore::Surface::GetBytesPerPixel(pixel_format)}; |
| 160 | const u64 size_in_bytes{framebuffer.stride * framebuffer.height * bytes_per_pixel}; | 160 | const u64 size_in_bytes{framebuffer.stride * framebuffer.height * bytes_per_pixel}; |
| 161 | const auto host_ptr{Memory::GetPointer(framebuffer_addr)}; | 161 | u8* const host_ptr{system.Memory().GetPointer(framebuffer_addr)}; |
| 162 | rasterizer->FlushRegion(ToCacheAddr(host_ptr), size_in_bytes); | 162 | rasterizer->FlushRegion(ToCacheAddr(host_ptr), size_in_bytes); |
| 163 | 163 | ||
| 164 | // TODO(Rodrigo): Read this from HLE | 164 | // TODO(Rodrigo): Read this from HLE |