Liam Middlebrook : d3dx11: Add D3DX11SaveTextureToFileA/W() stub.

Alexandre Julliard julliard at winehq.org
Mon Apr 20 15:01:50 CDT 2020


Module: wine
Branch: oldstable
Commit: 8743e7a3038763d6044f754c486dfe3b7fa64a8f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8743e7a3038763d6044f754c486dfe3b7fa64a8f

Author: Liam Middlebrook <lmiddlebrook at nvidia.com>
Date:   Wed Nov  6 10:06:31 2019 +0100

d3dx11: Add D3DX11SaveTextureToFileA/W() stub.

Signed-off-by: Liam Middlebrook <lmiddlebrook at nvidia.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit adef99a21c5205f02464be3139031d09fa2ce69a)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/d3dx11_42/d3dx11_42.spec |  4 ++--
 dlls/d3dx11_43/d3dx11_43.spec |  4 ++--
 dlls/d3dx11_43/texture.c      | 18 ++++++++++++++++++
 include/d3dx11tex.h           | 10 ++++------
 4 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/dlls/d3dx11_42/d3dx11_42.spec b/dlls/d3dx11_42/d3dx11_42.spec
index cb1f7805ff..c584810db4 100644
--- a/dlls/d3dx11_42/d3dx11_42.spec
+++ b/dlls/d3dx11_42/d3dx11_42.spec
@@ -39,6 +39,6 @@
 @ stub D3DX11PreprocessShaderFromResourceA
 @ stub D3DX11PreprocessShaderFromResourceW
 @ stub D3DX11SHProjectCubeMap
-@ stub D3DX11SaveTextureToFileA
-@ stub D3DX11SaveTextureToFileW
+@ stdcall D3DX11SaveTextureToFileA(ptr ptr long str)
+@ stdcall D3DX11SaveTextureToFileW(ptr ptr long wstr)
 @ stdcall D3DX11SaveTextureToMemory(ptr ptr long ptr long)
diff --git a/dlls/d3dx11_43/d3dx11_43.spec b/dlls/d3dx11_43/d3dx11_43.spec
index dde8821a30..30bdba4244 100644
--- a/dlls/d3dx11_43/d3dx11_43.spec
+++ b/dlls/d3dx11_43/d3dx11_43.spec
@@ -39,6 +39,6 @@
 @ stub D3DX11PreprocessShaderFromResourceA
 @ stub D3DX11PreprocessShaderFromResourceW
 @ stub D3DX11SHProjectCubeMap
-@ stub D3DX11SaveTextureToFileA
-@ stub D3DX11SaveTextureToFileW
+@ stdcall D3DX11SaveTextureToFileA(ptr ptr long str)
+@ stdcall D3DX11SaveTextureToFileW(ptr ptr long wstr)
 @ stdcall D3DX11SaveTextureToMemory(ptr ptr long ptr long)
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
index 6aaf8a7e02..b4d9bd106f 100644
--- a/dlls/d3dx11_43/texture.c
+++ b/dlls/d3dx11_43/texture.c
@@ -65,6 +65,24 @@ HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *d
     return E_NOTIMPL;
 }
 
+HRESULT WINAPI D3DX11SaveTextureToFileW(ID3D11DeviceContext *context, ID3D11Resource *texture,
+        D3DX11_IMAGE_FILE_FORMAT format, const WCHAR *filename)
+{
+    FIXME("context %p, texture %p, format %u, filename %s stub!\n",
+            context, texture, format, debugstr_w(filename));
+
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI D3DX11SaveTextureToFileA(ID3D11DeviceContext *context, ID3D11Resource *texture,
+        D3DX11_IMAGE_FILE_FORMAT format, const char *filename)
+{
+    FIXME("context %p, texture %p, format %u, filename %s stub!\n",
+            context, texture, format, debugstr_a(filename));
+
+    return E_NOTIMPL;
+}
+
 HRESULT WINAPI D3DX11SaveTextureToMemory(ID3D11DeviceContext *context, ID3D11Resource *texture,
         D3DX11_IMAGE_FILE_FORMAT format, ID3D10Blob **buffer, UINT flags)
 {
diff --git a/include/d3dx11tex.h b/include/d3dx11tex.h
index 4f792ec13e..b7c00ac4fd 100644
--- a/include/d3dx11tex.h
+++ b/include/d3dx11tex.h
@@ -110,23 +110,21 @@ extern "C" {
 HRESULT WINAPI D3DX11CreateShaderResourceViewFromMemory(ID3D11Device *device, const void *data,
         SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
         ID3D11ShaderResourceView **view, HRESULT *hresult);
-
 HRESULT WINAPI D3DX11CreateTextureFromFileA(ID3D11Device *device, const char *filename,
         D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump, ID3D11Resource **texture,
         HRESULT *hresult);
-
 HRESULT WINAPI D3DX11CreateTextureFromFileW(ID3D11Device *device, const WCHAR *filename,
         D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump, ID3D11Resource **texture,
         HRESULT *hresult);
-
 HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *src_data, SIZE_T src_data_size,
         D3DX11_IMAGE_LOAD_INFO *loadinfo, ID3DX11ThreadPump *pump, ID3D11Resource **texture, HRESULT *hresult);
-
 HRESULT WINAPI D3DX11FilterTexture(ID3D11DeviceContext *context, ID3D11Resource *texture, UINT src_level, UINT filter);
-
 HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
         D3DX11_IMAGE_INFO *img_info, HRESULT *hresult);
-
+HRESULT WINAPI D3DX11SaveTextureToFileA(ID3D11DeviceContext *context, ID3D11Resource *texture,
+        D3DX11_IMAGE_FILE_FORMAT format, const char *filename);
+HRESULT WINAPI D3DX11SaveTextureToFileW(ID3D11DeviceContext *context, ID3D11Resource *texture,
+        D3DX11_IMAGE_FILE_FORMAT format, const WCHAR *filename);
 HRESULT WINAPI D3DX11SaveTextureToMemory(ID3D11DeviceContext *context, ID3D11Resource *texture,
         D3DX11_IMAGE_FILE_FORMAT format, ID3D10Blob **buffer, UINT flags);
 




More information about the wine-cvs mailing list