Commit 7772c4fd authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Enforce map access on all resources.

parent ce50a7ff
......@@ -346,6 +346,12 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
resource, sub_resource_idx, map_desc, debug_box(box), flags);
if (!(resource->access & WINED3D_RESOURCE_ACCESS_MAP))
{
WARN("Resource is not mappable.\n");
return WINED3DERR_INVALIDCALL;
}
flags = wined3d_resource_sanitise_map_flags(resource, flags);
wined3d_resource_wait_idle(resource);
......
......@@ -1897,12 +1897,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3DERR_INVALIDCALL;
}
if (!(resource->access & WINED3D_RESOURCE_ACCESS_MAP))
{
WARN("Trying to map unmappable texture.\n");
return WINED3DERR_INVALIDCALL;
}
if (texture->flags & WINED3D_TEXTURE_DC_IN_USE)
{
WARN("DC is in use.\n");
......
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