From 4995b4abe3a07e8e8e0600794d73a20408b1ff2b Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 5 Jun 2022 18:29:39 +0300 Subject: [PATCH] gl: Do not use raw GL image copy command for RSX data --- rpcs3/Emu/RSX/GL/GLTextureCache.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLTextureCache.cpp b/rpcs3/Emu/RSX/GL/GLTextureCache.cpp index c52ef20f34..72258cf808 100644 --- a/rpcs3/Emu/RSX/GL/GLTextureCache.cpp +++ b/rpcs3/Emu/RSX/GL/GLTextureCache.cpp @@ -194,8 +194,10 @@ namespace gl if (src_w == slice.dst_w && src_h == slice.dst_h) { - glCopyImageSubData(src_image->id(), GL_TEXTURE_2D, 0, src_x, src_y, 0, - dst_image->id(), static_cast(dst_image->get_target()), slice.level, slice.dst_x, slice.dst_y, slice.dst_z, src_w, src_h, 1); + gl::g_hw_blitter->copy_image(cmd, src_image, dst_image, 0, slice.level, + position3i{ src_x, src_y, 0 }, + position3i{ slice.dst_x, slice.dst_y, slice.dst_z }, + size3i{ src_w, src_h, 1 }); } else { @@ -222,8 +224,10 @@ namespace gl if (_dst != dst_image) { // Data cast comes after scaling - glCopyImageSubData(tmp->id(), GL_TEXTURE_2D, 0, slice.dst_x, slice.dst_y, 0, - dst_image->id(), static_cast(dst_image->get_target()), slice.level, slice.dst_x, slice.dst_y, slice.dst_z, slice.dst_w, slice.dst_h, 1); + gl::g_hw_blitter->copy_image(cmd, tmp.get(), dst_image, 0, slice.level, + position3i{slice.dst_x, slice.dst_y, 0}, + position3i{slice.dst_x, slice.dst_y, slice.dst_z}, + size3i{slice.dst_w, slice.dst_h, 1}); } } }