Commit def83634 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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

parent 2420d37a
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment