Henri Verbeet : wined3d: Do not set WINED3D_TEXTURE_CREATE_MAPPABLE on the cursor texture.
Alexandre Julliard
julliard at winehq.org
Mon Nov 26 16:20:12 CST 2018
Module: wine
Branch: master
Commit: 74931f9217869f8cad6b0b686ea1085f048e9c9c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=74931f9217869f8cad6b0b686ea1085f048e9c9c
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Nov 26 22:28:14 2018 +0330
wined3d: Do not set WINED3D_TEXTURE_CREATE_MAPPABLE on the cursor texture.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/device.c | 3 +--
dlls/wined3d/texture.c | 6 ------
include/wine/wined3d.h | 1 -
3 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 7cb32a6..6d6f530 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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))
{
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index dbc256f..5b41d4a 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -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;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 40553f7..b0b1abc 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -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
More information about the wine-cvs
mailing list