[PATCH 3/5] wined3d: Use the resource access flags in texture_resource_sub_resource_map().
Henri Verbeet
hverbeet at codeweavers.com
Fri Feb 2 10:58:52 CST 2018
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
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;
}
--
2.1.4
More information about the wine-devel
mailing list