Sven Hesse : d3d11: Implement d3d10_texture1d_Map().

Alexandre Julliard julliard at winehq.org
Tue Apr 3 15:39:06 CDT 2018


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

Author: Sven Hesse <shesse at codeweavers.com>
Date:   Tue Apr  3 01:46:28 2018 +0430

d3d11: Implement d3d10_texture1d_Map().

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

---

 dlls/d3d11/texture.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c
index 9bda6b0..0730dbc 100644
--- a/dlls/d3d11/texture.c
+++ b/dlls/d3d11/texture.c
@@ -347,10 +347,25 @@ static UINT STDMETHODCALLTYPE d3d10_texture1d_GetEvictionPriority(ID3D10Texture1
 static HRESULT STDMETHODCALLTYPE d3d10_texture1d_Map(ID3D10Texture1D *iface, UINT sub_resource_idx,
         D3D10_MAP map_type, UINT map_flags, void **data)
 {
-    FIXME("iface %p, sub_resource_idx %u, map_type %u, map_flags %#x, data %p stub!\n",
+    struct d3d_texture1d *texture = impl_from_ID3D10Texture1D(iface);
+    struct wined3d_map_desc wined3d_map_desc;
+    HRESULT hr;
+
+    TRACE("iface %p, sub_resource_idx %u, map_type %u, map_flags %#x, data %p.\n",
             iface, sub_resource_idx, map_type, map_flags, data);
 
-    return E_NOTIMPL;
+    if (map_flags)
+        FIXME("Ignoring map_flags %#x.\n", map_flags);
+
+    wined3d_mutex_lock();
+    if (SUCCEEDED(hr = wined3d_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx,
+            &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type))))
+    {
+        *data = wined3d_map_desc.data;
+    }
+    wined3d_mutex_unlock();
+
+    return hr;
 }
 
 static void STDMETHODCALLTYPE d3d10_texture1d_Unmap(ID3D10Texture1D *iface, UINT sub_resource_idx)




More information about the wine-cvs mailing list