From f6b7ecea7438a37635407ab5848d175b98cd98a7 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Mon, 9 Mar 2026 22:20:39 +0300 Subject: [PATCH] gl: Support packing/unpacking images with padding --- rpcs3/Emu/RSX/GL/GLTexture.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLTexture.cpp b/rpcs3/Emu/RSX/GL/GLTexture.cpp index 5c85f71c2e..64e451e579 100644 --- a/rpcs3/Emu/RSX/GL/GLTexture.cpp +++ b/rpcs3/Emu/RSX/GL/GLTexture.cpp @@ -372,7 +372,10 @@ namespace gl } } - src->copy_to(*dst, dst_offset, static_cast(pack_info.format), static_cast(pack_info.type), src_level, src_region, {}); + pixel_pack_settings pack_settings{}; + if (pack_info.alignment) pack_settings.alignment(pack_info.alignment); + if (pack_info.row_length) pack_settings.row_length(pack_info.row_length); + src->copy_to(*dst, dst_offset, static_cast(pack_info.format), static_cast(pack_info.type), src_level, src_region, pack_settings); return false; }; @@ -620,8 +623,11 @@ namespace gl glBindBuffer(GL_SHADER_STORAGE_BUFFER, GL_NONE); + pixel_unpack_settings unpack_settings{}; + if (unpack_info.alignment) unpack_settings.alignment(unpack_info.alignment); + if (unpack_info.format) unpack_settings.row_length(unpack_info.row_length); dst->copy_from(*transfer_buf, out_offset, static_cast(unpack_info.format), - static_cast(unpack_info.type), dst_level, dst_region, {}); + static_cast(unpack_info.type), dst_level, dst_region, unpack_settings); } }