Henri Verbeet : d3d11: Set WINED3D_RESOURCE_ACCESS_MAP on 2D textures.

Alexandre Julliard julliard at winehq.org
Tue Feb 13 13:57:55 CST 2018


Module: wine
Branch: master
Commit: 469dd87899d71d3e8bb7a1abb282c36f939d1e40
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=469dd87899d71d3e8bb7a1abb282c36f939d1e40

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Feb 13 13:20:45 2018 +0330

d3d11: Set WINED3D_RESOURCE_ACCESS_MAP on 2D textures.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d11/texture.c   | 2 +-
 dlls/wined3d/texture.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c
index 39d71cd..4315284 100644
--- a/dlls/d3d11/texture.c
+++ b/dlls/d3d11/texture.c
@@ -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;
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 750101f..3806103 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -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)




More information about the wine-cvs mailing list