From: Paul Gofman <pgofman@codeweavers.com> --- dlls/wined3d/surface.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index cf081a17c68..7a7fd625386 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -964,6 +964,22 @@ do { \ dBottomLeft = dTopLeft + ((dst_height - 1) * dst_map.row_pitch); dBottomRight = dBottomLeft + ((dst_width - 1) * bpp); + if (same_sub_resource && + !(dst_box->top < src_box->top || dst_box->right <= src_box->left || src_box->right <= dst_box->left) + && fx->fx & (WINEDDBLTFX_MIRRORLEFTRIGHT | WINEDDBLTFX_MIRRORUPDOWN | WINEDDBLTFX_ROTATE180 + | WINEDDBLTFX_ROTATE270 | WINEDDBLTFX_ROTATE90)) + { + if ((tmp_buffer = malloc(src_height * src_map.row_pitch))) + { + memcpy(tmp_buffer, sbase, src_height * src_map.row_pitch); + sbase = tmp_buffer; + } + } + else + { + tmp_buffer = NULL; + } + if (fx->fx & WINEDDBLTFX_ARITHSTRETCHY) { /* I don't think we need to do anything about this flag. */ @@ -1105,6 +1121,7 @@ do { \ goto error; #undef COPY_COLORKEY_FX } + free(tmp_buffer); } error: -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10983