From: Matteo Bruni Subject: Re: [PATCH] d3dx11: Add D3DX11SaveTextureToFileA/W stub. Message-Id: Date: Wed, 19 Sep 2018 22:03:57 +0200 In-Reply-To: <20180907155159.14037-1-andrey.goosev@gmail.com> References: <20180907155159.14037-1-andrey.goosev@gmail.com> On Fri, Sep 7, 2018 at 5:52 PM Andrey Gusev wrote: > > Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45031 > > Signed-off-by: Andrey Gusev Sorry for the delay. You can find a couple of notes below. > --- > dlls/d3dx11_42/d3dx11_42.spec | 4 ++-- > dlls/d3dx11_43/d3dx11_43.spec | 4 ++-- > dlls/d3dx11_43/texture.c | 18 ++++++++++++++++++ > include/d3dx11tex.h | 6 ++++++ > 4 files changed, 28 insertions(+), 4 deletions(-) > > diff --git a/dlls/d3dx11_42/d3dx11_42.spec b/dlls/d3dx11_42/d3dx11_42.spec > index cb1f7805ff..033c6a545c 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 ptr) d3dx11_43.D3DX11SaveTextureToFileA > +@ stdcall D3DX11SaveTextureToFileW(ptr ptr long ptr) d3dx11_43.D3DX11SaveTextureToFileW > @ stdcall D3DX11SaveTextureToMemory(ptr ptr long ptr long) The 4th argument should be str or wstr, respectively. Same for d3dx11_43. > diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c > index 6aaf8a7e02..c053e3920f 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 D3DX11SaveTextureToFileA(ID3D11DeviceContext *context, ID3D11Resource *texture, > + D3DX11_IMAGE_FILE_FORMAT format, const char *dst_filename) The "dst_" prefix doesn't seem useful. BTW, it might make sense to implement D3DX11SaveTextureToFileA properly (i.e. the usual MultiByteToWideChar() dance and then call D3DX11SaveTextureToFileW()) while at it. Not required, but it would be nice to have. Also, do you know if this actually fixes bug 45031? What happens after this patch?