Paul Gofman : wined3d: Allow multisample destination locations for all colour blits.

Alexandre Julliard julliard at winehq.org
Thu May 28 17:11:10 CDT 2020


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

Author: Paul Gofman <pgofman at codeweavers.com>
Date:   Thu May 28 22:50:17 2020 +0430

wined3d: Allow multisample destination locations for all colour blits.

Signed-off-by: Paul Gofman <pgofman 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 | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index bdcbdf5a2a..94743c45e3 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1459,6 +1459,20 @@ struct wined3d_blitter *wined3d_cpu_blitter_create(void)
     return blitter;
 }
 
+static bool wined3d_is_colour_blit(enum wined3d_blit_op blit_op)
+{
+    switch (blit_op)
+    {
+        case WINED3D_BLIT_OP_COLOR_BLIT:
+        case WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST:
+        case WINED3D_BLIT_OP_COLOR_BLIT_CKEY:
+            return true;
+
+        default:
+            return false;
+    }
+}
+
 HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx,
         const struct wined3d_box *dst_box, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx,
         const struct wined3d_box *src_box, DWORD flags, const struct wined3d_blt_fx *fx,
@@ -1701,7 +1715,7 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
     if (!(dst_texture->resource.access & WINED3D_RESOURCE_ACCESS_GPU))
         dst_location = dst_texture->resource.map_binding;
     else if (dst_texture->resource.multisample_type != WINED3D_MULTISAMPLE_NONE
-            && (scale || convert || blit_op != WINED3D_BLIT_OP_COLOR_BLIT))
+            && (scale || convert || !wined3d_is_colour_blit(blit_op)))
         dst_location = WINED3D_LOCATION_RB_RESOLVED;
     else
         dst_location = dst_texture->resource.draw_binding;




More information about the wine-cvs mailing list