Henri Verbeet : wined3d: Use the resource access flags in texture_resource_sub_resource_map().

Alexandre Julliard julliard at winehq.org
Fri Feb 2 12:24:39 CST 2018


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri Feb  2 20:46:52 2018 +0330

wined3d: Use the resource access flags in texture_resource_sub_resource_map().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/texture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 5007696..e480a22 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1872,7 +1872,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
     if (box && FAILED(wined3d_texture_check_box_dimensions(texture, texture_level, box)))
     {
         WARN("Map box is invalid.\n");
-        if (((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && resource->pool == WINED3D_POOL_DEFAULT)
+        if (((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && !(resource->access & WINED3D_RESOURCE_ACCESS_CPU))
                 || resource->type != WINED3D_RTYPE_TEXTURE_2D)
             return WINED3DERR_INVALIDCALL;
     }




More information about the wine-cvs mailing list