[PATCH 5/7] wined3d: UpdateTexture requires a sysmem source and default destination

Stefan Dösinger stefan at codeweavers.com
Sun Aug 25 19:01:30 CDT 2013


Note that this is already enforced for 2D and cube textures by
wined3d_device_update_surface.

Tests for this and follow-up patches can be found in the archive posted
to wine-devel at
http://www.winehq.org/pipermail/wine-devel/2013-August/100890.html. They
are next in my send queue.
---
 dlls/wined3d/device.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ce0e083..97d78f9 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4134,9 +4134,14 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
         return WINED3DERR_INVALIDCALL;
     }
 
-    if (src_texture == dst_texture)
+    if (src_texture->resource.pool != WINED3D_POOL_SYSTEM_MEM)
     {
-        WARN("Source and destination are the same object, returning WINED3DERR_INVALIDCALL.\n");
+        WARN("Source texture not in WINED3D_POOL_SYSTEM_MEM, returning WINED3DERR_INVALIDCALL.\n");
+        return WINED3DERR_INVALIDCALL;
+    }
+    if (dst_texture->resource.pool != WINED3D_POOL_DEFAULT)
+    {
+        WARN("Destination texture not in WINED3D_POOL_DEFAULT, returning WINED3DERR_INVALIDCALL.\n");
         return WINED3DERR_INVALIDCALL;
     }
 
-- 
1.8.1.5




More information about the wine-patches mailing list