[PATCH 3/4] wined3d: Allow multisample destination location for all color blits.
Paul Gofman
pgofman at codeweavers.com
Wed May 27 06:36:57 CDT 2020
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
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 8db322dec7..eaf64cf749 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_color_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_color_blit(blit_op)))
dst_location = WINED3D_LOCATION_RB_RESOLVED;
else
dst_location = dst_texture->resource.draw_binding;
--
2.26.2
More information about the wine-devel
mailing list