wined3d: Enforce map access on all resources.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ce50a7ff4d
commit
7772c4fdbf
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue