Commit 469dd878 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d11: Set WINED3D_RESOURCE_ACCESS_MAP on 2D textures.

parent 5ceaf934
......@@ -517,7 +517,7 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE
wined3d_desc.multisample_type = desc->SampleDesc.Count > 1 ? desc->SampleDesc.Count : WINED3D_MULTISAMPLE_NONE;
wined3d_desc.multisample_quality = desc->SampleDesc.Quality;
wined3d_desc.usage = wined3d_usage_from_d3d11(desc->BindFlags, desc->Usage);
wined3d_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
wined3d_desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP;
wined3d_desc.width = desc->Width;
wined3d_desc.height = desc->Height;
wined3d_desc.depth = 1;
......
......@@ -1901,8 +1901,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
if (!(resource->access & WINED3D_RESOURCE_ACCESS_MAP))
{
WARN("Trying to map unmappable texture.\n");
if (resource->type != WINED3D_RTYPE_TEXTURE_2D)
return WINED3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (texture->flags & WINED3D_TEXTURE_DC_IN_USE)
......
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