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

Paul Gofman gofmanp at gmail.com
Tue Nov 20 06:20:44 CST 2018


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46068

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.

Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
 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 5f5c53a8b8..18542e1b74 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)
-- 
2.19.1




More information about the wine-devel mailing list