Module: wine Branch: master Commit: 0951a1b6db1ed219058f82c330e22d9d9bfc8516 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0951a1b6db1ed219058f82c330...
Author: Andrey Gusev andrey.goosev@gmail.com Date: Fri Nov 4 15:43:21 2016 +0100
d3dx11: Add D3DX11SaveTextureToMemory stub.
Signed-off-by: Andrey Gusev andrey.goosev@gmail.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d3dx11_42/Makefile.in | 3 ++- dlls/d3dx11_42/d3dx11_42.spec | 2 +- dlls/d3dx11_43/Makefile.in | 3 ++- dlls/d3dx11_43/d3dx11_43.spec | 2 +- dlls/d3dx11_43/texture.c | 35 +++++++++++++++++++++++++++++++++++ include/d3dx11tex.h | 3 +++ 6 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dx11_42/Makefile.in b/dlls/d3dx11_42/Makefile.in index 3ed7fd3..d20f660 100644 --- a/dlls/d3dx11_42/Makefile.in +++ b/dlls/d3dx11_42/Makefile.in @@ -4,6 +4,7 @@ PARENTSRC = ../d3dx11_43
C_SRCS = \ async.c \ - d3dx11_42.c + d3dx11_42.c \ + texture.c
RC_SRCS = version.rc diff --git a/dlls/d3dx11_42/d3dx11_42.spec b/dlls/d3dx11_42/d3dx11_42.spec index 45e8482..f97ec24 100644 --- a/dlls/d3dx11_42/d3dx11_42.spec +++ b/dlls/d3dx11_42/d3dx11_42.spec @@ -41,4 +41,4 @@ @ stub D3DX11SHProjectCubeMap @ stub D3DX11SaveTextureToFileA @ stub D3DX11SaveTextureToFileW -@ stub D3DX11SaveTextureToMemory +@ stdcall D3DX11SaveTextureToMemory(ptr ptr long ptr long) diff --git a/dlls/d3dx11_43/Makefile.in b/dlls/d3dx11_43/Makefile.in index 1cc4911..d5c5b45 100644 --- a/dlls/d3dx11_43/Makefile.in +++ b/dlls/d3dx11_43/Makefile.in @@ -4,6 +4,7 @@ IMPORTS = d3dcompiler
C_SRCS = \ async.c \ - d3dx11_43.c + d3dx11_43.c \ + texture.c
RC_SRCS = version.rc diff --git a/dlls/d3dx11_43/d3dx11_43.spec b/dlls/d3dx11_43/d3dx11_43.spec index 7c3a598..0a6350c 100644 --- a/dlls/d3dx11_43/d3dx11_43.spec +++ b/dlls/d3dx11_43/d3dx11_43.spec @@ -41,4 +41,4 @@ @ stub D3DX11SHProjectCubeMap @ stub D3DX11SaveTextureToFileA @ stub D3DX11SaveTextureToFileW -@ stub D3DX11SaveTextureToMemory +@ stdcall D3DX11SaveTextureToMemory(ptr ptr long ptr long) diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c new file mode 100644 index 0000000..832f64f --- /dev/null +++ b/dlls/d3dx11_43/texture.c @@ -0,0 +1,35 @@ +/* + * Copyright 2016 Andrey Gusev + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "wine/port.h" +#include "d3dx11.h" +#include "d3dcompiler.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +HRESULT WINAPI D3DX11SaveTextureToMemory(ID3D11DeviceContext *context, ID3D11Resource *texture, + D3DX11_IMAGE_FILE_FORMAT format, ID3D10Blob **buffer, UINT flags) +{ + FIXME("context %p, texture %p, format %u, buffer %p, flags %#x stub!\n", + context, texture, format, buffer, flags); + + return E_NOTIMPL; +} diff --git a/include/d3dx11tex.h b/include/d3dx11tex.h index 0217777..bd22f32 100644 --- a/include/d3dx11tex.h +++ b/include/d3dx11tex.h @@ -92,6 +92,9 @@ HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *s HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump, D3DX11_IMAGE_INFO *img_info, HRESULT *hresult);
+HRESULT WINAPI D3DX11SaveTextureToMemory(ID3D11DeviceContext *context, ID3D11Resource *texture, + D3DX11_IMAGE_FILE_FORMAT format, ID3D10Blob **buffer, UINT flags); + #ifdef __cplusplus } #endif