summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-23 03:54:04 +0100
committerbunnei <bunneidev@gmail.com>2018-03-23 03:54:04 +0100
commit6ced80bb470977a8a261275bdb4d2a133932facf (patch)
tree80937f4c85c19bbce3f91fcc99f8d0d35cb7e046
parentvideo_core: Move MortonCopyPixels128 to utils header. (diff)
downloadyuzu-6ced80bb470977a8a261275bdb4d2a133932facf.tar
yuzu-6ced80bb470977a8a261275bdb4d2a133932facf.tar.gz
yuzu-6ced80bb470977a8a261275bdb4d2a133932facf.tar.bz2
yuzu-6ced80bb470977a8a261275bdb4d2a133932facf.tar.lz
yuzu-6ced80bb470977a8a261275bdb4d2a133932facf.tar.xz
yuzu-6ced80bb470977a8a261275bdb4d2a133932facf.tar.zst
yuzu-6ced80bb470977a8a261275bdb4d2a133932facf.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 7ef08980f..175f329e3 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -530,7 +530,7 @@ MICROPROFILE_DEFINE(OpenGL_SurfaceLoad, "OpenGL", "Surface Load", MP_RGB(128, 64
void CachedSurface::LoadGLBuffer(VAddr load_start, VAddr load_end) {
ASSERT(type != SurfaceType::Fill);
- const u8* const texture_src_data = Memory::GetPointer(addr);
+ u8* texture_src_data = Memory::GetPointer(addr);
if (texture_src_data == nullptr)
return;
@@ -539,13 +539,6 @@ void CachedSurface::LoadGLBuffer(VAddr load_start, VAddr load_end) {
gl_buffer.reset(new u8[gl_buffer_size]);
}
- // TODO: Should probably be done in ::Memory:: and check for other regions too
- if (load_start < Memory::VRAM_VADDR_END && load_end > Memory::VRAM_VADDR_END)
- load_end = Memory::VRAM_VADDR_END;
-
- if (load_start < Memory::VRAM_VADDR && load_end > Memory::VRAM_VADDR)
- load_start = Memory::VRAM_VADDR;
-
MICROPROFILE_SCOPE(OpenGL_SurfaceLoad);
ASSERT(load_start >= addr && load_end <= end);
@@ -553,15 +546,11 @@ void CachedSurface::LoadGLBuffer(VAddr load_start, VAddr load_end) {
if (!is_tiled) {
ASSERT(type == SurfaceType::Color);
- std::memcpy(&gl_buffer[start_offset], texture_src_data + start_offset,
- load_end - load_start);
+ VideoCore::MortonCopyPixels128(width, height, GetFormatBpp(), 4,
+ texture_src_data + start_offset, &gl_buffer[start_offset],
+ true);
} else {
- if (type == SurfaceType::Texture) {
- ASSERT_MSG(false, "Unimplemented");
- } else {
- morton_to_gl_fns[static_cast<size_t>(pixel_format)](stride, height, &gl_buffer[0], addr,
- load_start, load_end);
- }
+ ASSERT_MSG(false, "Unimplemented");
}
}