Paul Gofman : wined3d: Don' t pull _ACCESS_GPU textures to system memory in texture2d_blt().

Alexandre Julliard julliard at winehq.org
Tue Nov 20 15:39:50 CST 2018


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

Author: Paul Gofman <gofmanp at gmail.com>
Date:   Tue Nov 20 15:20:44 2018 +0300

wined3d: Don't pull _ACCESS_GPU textures to system memory in texture2d_blt().

The change introduced by commit 54a9e84952ce8f566f79ab92930faf84bad0cfc1 had
side effect of ultimately selecting detsination texture location as
dst_texture->resource.map_binding, which is not the case in the default texture2d_blt()
code path.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46068
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/surface.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 5f5c53a..18542e1 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3275,7 +3275,8 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
         }
     }
     else if (!(src_sub_resource->locations & surface_simple_locations)
-            && (dst_sub_resource->locations & dst_texture->resource.map_binding))
+            && (dst_sub_resource->locations & dst_texture->resource.map_binding)
+            && !(dst_texture->resource.access & WINED3D_RESOURCE_ACCESS_GPU))
     {
         /* Download */
         if (scale)




More information about the wine-cvs mailing list