Matteo Bruni : wined3d: Allow cross-swapchain blits in the supported cases.

Alexandre Julliard julliard at winehq.org
Wed Aug 14 20:17:23 CDT 2019


Module: wine
Branch: master
Commit: 493f4098c68bc6e95bb42ca04c31b6c6bc1eac85
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=493f4098c68bc6e95bb42ca04c31b6c6bc1eac85

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Tue Aug 13 22:02:13 2019 +0200

wined3d: Allow cross-swapchain blits in the supported cases.

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/surface.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index de77df2..7009df2 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2411,10 +2411,12 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
     src_swapchain = src_texture->swapchain;
     dst_swapchain = dst_texture->swapchain;
 
-    /* TODO: We could support cross-swapchain blits by first downloading the
-     * source to a texture. */
-    if (src_swapchain && dst_swapchain && src_swapchain != dst_swapchain)
+    if (src_swapchain && dst_swapchain && src_swapchain != dst_swapchain
+            && (wined3d_settings.offscreen_rendering_mode != ORM_FBO
+            || src_texture == src_swapchain->front_buffer))
     {
+        /* TODO: We could support cross-swapchain blits by first downloading
+         * the source to a texture. */
         FIXME("Cross-swapchain blit not supported.\n");
         return WINED3DERR_INVALIDCALL;
     }




More information about the wine-cvs mailing list