Module: wine Branch: master Commit: 72a2f02486d9cde3da5cfccc33871a82c58af7e9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=72a2f02486d9cde3da5cfccc3...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Jan 30 16:12:37 2018 +0330
wined3d: Use the resource access flags in wined3d_device_update_texture().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/device.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 67c1855..6a642c9 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3768,14 +3768,15 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, return WINED3DERR_INVALIDCALL; }
- if (src_texture->resource.pool != WINED3D_POOL_SYSTEM_MEM || src_texture->resource.usage & WINED3DUSAGE_SCRATCH) + if (src_texture->resource.access & WINED3D_RESOURCE_ACCESS_GPU + || src_texture->resource.usage & WINED3DUSAGE_SCRATCH) { - WARN("Source texture not in WINED3D_POOL_SYSTEM_MEM, returning WINED3DERR_INVALIDCALL.\n"); + WARN("Source resource is GPU accessible or a scratch resource.\n"); return WINED3DERR_INVALIDCALL; } - if (dst_texture->resource.pool != WINED3D_POOL_DEFAULT) + if (dst_texture->resource.access & WINED3D_RESOURCE_ACCESS_CPU) { - WARN("Destination texture not in WINED3D_POOL_DEFAULT, returning WINED3DERR_INVALIDCALL.\n"); + WARN("Destination resource is CPU accessible.\n"); return WINED3DERR_INVALIDCALL; }