wined3d: Do not set WINED3D_TEXTURE_CREATE_MAPPABLE on the cursor texture.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2018-11-26 22:10:14 +03:30 committed by Alexandre Julliard
parent e5a6861d3a
commit 74931f9217
3 changed files with 1 additions and 9 deletions

View File

@ -4563,8 +4563,7 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined
desc.depth = 1;
desc.size = 0;
hr = wined3d_texture_create(device, &desc, 1, 1, WINED3D_TEXTURE_CREATE_MAPPABLE,
&data, NULL, &wined3d_null_parent_ops, &texture);
hr = wined3d_texture_create(device, &desc, 1, 1, 0, &data, NULL, &wined3d_null_parent_ops, &texture);
wined3d_resource_unmap(&cursor_image->resource, sub_resource_idx);
if (FAILED(hr))
{

View File

@ -2906,10 +2906,6 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
return WINED3DERR_INVALIDCALL;
}
if ((flags & WINED3D_TEXTURE_CREATE_MAPPABLE) && !((desc->usage & WINED3DUSAGE_DYNAMIC)
|| (desc->bind_flags & (WINED3D_BIND_RENDER_TARGET | WINED3D_BIND_DEPTH_STENCIL))))
WARN("Creating a mappable texture that doesn't specify dynamic usage.\n");
pow2_width = desc->width;
pow2_height = desc->height;
if (((desc->width & (desc->width - 1)) || (desc->height & (desc->height - 1)) || (desc->depth & (desc->depth - 1)))
@ -3010,8 +3006,6 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
return hr;
}
wined3d_resource_update_draw_binding(&texture->resource);
if (flags & WINED3D_TEXTURE_CREATE_MAPPABLE)
texture->resource.access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
texture->texture_ops = texture_ops;

View File

@ -1562,7 +1562,6 @@ enum wined3d_shader_type
#define WINED3D_PALETTE_ALLOW_256 0x00000002
#define WINED3D_PALETTE_ALPHA 0x00000004
#define WINED3D_TEXTURE_CREATE_MAPPABLE 0x00000001
#define WINED3D_TEXTURE_CREATE_DISCARD 0x00000002
#define WINED3D_TEXTURE_CREATE_GET_DC_LENIENT 0x00000004
#define WINED3D_TEXTURE_CREATE_GET_DC 0x00000008