Module: wine Branch: master Commit: 8ffbd56a4380ff23381c5b2c137b4b4b2de4f61e URL: https://gitlab.winehq.org/wine/wine/-/commit/8ffbd56a4380ff23381c5b2c137b4b4...
Author: Andrey Gusev andrey.goosev@gmail.com Date: Sun Aug 7 12:53:14 2022 +0300
d3dx10: Implement D3DX10PreprocessShaderFromMemory().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53427
---
dlls/d3dx10_43/async.c | 12 ------------ dlls/d3dx10_43/compiler.c | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/dlls/d3dx10_43/async.c b/dlls/d3dx10_43/async.c index 667219b3500..62627886804 100644 --- a/dlls/d3dx10_43/async.c +++ b/dlls/d3dx10_43/async.c @@ -600,18 +600,6 @@ HRESULT WINAPI D3DX10CreateAsyncTextureProcessor(ID3D10Device *device, return S_OK; }
-HRESULT WINAPI D3DX10PreprocessShaderFromMemory(const char *data, SIZE_T data_size, const char *filename, - const D3D10_SHADER_MACRO *defines, ID3DInclude *include, ID3DX10ThreadPump *pump, ID3D10Blob **shader_text, - ID3D10Blob **errors, HRESULT *hresult) -{ - FIXME("data %s, data_size %Iu, filename %s, defines %p, include %p, pump %p, shader_text %p, " - "errors %p, hresult %p stub!\n", - debugstr_an(data, data_size), data_size, debugstr_a(filename), defines, include, pump, - shader_text, errors, hresult); - - return E_NOTIMPL; -} - struct work_item { struct list entry; diff --git a/dlls/d3dx10_43/compiler.c b/dlls/d3dx10_43/compiler.c index c66eb679a8f..ad27783eabb 100644 --- a/dlls/d3dx10_43/compiler.c +++ b/dlls/d3dx10_43/compiler.c @@ -183,3 +183,26 @@ HRESULT WINAPI D3DX10CreateEffectFromResourceW(HMODULE module, const WCHAR *reso free(filename); return hr; } + +HRESULT WINAPI D3DX10PreprocessShaderFromMemory(const char *data, SIZE_T data_size, const char *filename, + const D3D10_SHADER_MACRO *defines, ID3DInclude *include, ID3DX10ThreadPump *pump, ID3D10Blob **shader_text, + ID3D10Blob **errors, HRESULT *hresult) +{ + HRESULT hr; + + TRACE("data %s, data_size %Iu, filename %s, defines %p, include %p, pump %p, shader_text %p, " + "errors %p, hresult %p.\n", + debugstr_an(data, data_size), data_size, debugstr_a(filename), defines, include, pump, + shader_text, errors, hresult); + + if (!data) + return E_FAIL; + + if (pump) + FIXME("Unimplemented ID3DX10ThreadPump handling.\n"); + + hr = D3DPreprocess(data, data_size, filename, defines, include, shader_text, errors); + if (hresult) + *hresult = hr; + return hr; +}