[PATCH 2/2] wined3d: Do not set WINED3D_TEXTURE_CREATE_MAPPABLE on the cursor texture.

Henri Verbeet hverbeet at codeweavers.com
Mon Nov 26 12:40:14 CST 2018


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 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 7cb32a6abb3..6d6f53060ee 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 dbc256f1102..5b41d4a9cdc 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 40553f7e514..b0b1abc508e 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
-- 
2.11.0




More information about the wine-devel mailing list