[PATCH] d3dx11: Add D3DX11CreateShaderResourceViewFromMemory stub. (resend)

Matteo Bruni matteo.mystral at gmail.com
Fri Jan 27 12:13:43 CST 2017


2017-01-25 12:19 GMT+01:00 Andrey Gusev <andrey.goosev at gmail.com>:
> Signed-off-by: Andrey Gusev <andrey.goosev at gmail.com>
> ---
>  dlls/d3dx11_42/Makefile.in    |  1 +
>  dlls/d3dx11_42/d3dx11_42.spec |  2 +-
>  dlls/d3dx11_43/Makefile.in    |  1 +
>  dlls/d3dx11_43/d3dx11_43.spec |  2 +-
>  dlls/d3dx11_43/shader.c       | 36 ++++++++++++++++++++++++++++++++++++
>  5 files changed, 40 insertions(+), 2 deletions(-)
>  create mode 100644 dlls/d3dx11_43/shader.c

I had a better look at the patch and unfortunately I don't think this
is okay as is. Sorry that I missed it the first time around.

The D3DX11CreateShaderResourceViewFrom* functions are probably
supposed to be very thin wrappers over the corresponding
D3DX11CreateTextureFrom* functions. So e.g. for
D3DX11CreateShaderResourceViewFromMemory() an implementation calling
D3DX11CreateTextureFromMemory() and then
ID3D11Device_CreateShaderResourceView(device, ...) on the returned
resource is probably all there is to it. Except that, for the pump !=
NULL case, you want to do the work on the thread pump so e.g. create
the the SRV in a ID3DX11DataProcessor.

Anyway, it's still okay to me to go with just a stub or with an
implementation only taking into account the !pump case.

You need to add the function definition to d3dx11tex.h though. Also,
given that this is really a texture function, it doesn't make sense to
put it in a new shader.c file. Just adding it to texture.c seems fine.



More information about the wine-devel mailing list