Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52622
-- v3: d3dcompiler: Add D3DCreateLinker stub.
From: Vijay Kiran Kamuju infyquest@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52622 --- dlls/d3dcompiler_43/compiler.c | 6 ++++++ dlls/d3dcompiler_47/d3dcompiler_47.spec | 2 +- include/d3d11shader.h | 16 ++++++++++++++++ include/d3dcompiler.h | 1 + 4 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index e5c9981ded5..4b2b05df917 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -774,6 +774,12 @@ end: return hr; }
+HRESULT WINAPI D3DCreateLinker(ID3D11Linker **linker) +{ + FIXME("linker %p stub!\n", linker); + return E_NOTIMPL; +} + HRESULT WINAPI D3DLoadModule(const void *data, SIZE_T size, ID3D11Module **module) { FIXME("data %p, size %Iu, module %p stub!\n", data, size, module); diff --git a/dlls/d3dcompiler_47/d3dcompiler_47.spec b/dlls/d3dcompiler_47/d3dcompiler_47.spec index ca132979565..3ed049e6ab8 100644 --- a/dlls/d3dcompiler_47/d3dcompiler_47.spec +++ b/dlls/d3dcompiler_47/d3dcompiler_47.spec @@ -5,7 +5,7 @@ @ stub D3DCompressShaders @ stdcall D3DCreateBlob(long ptr) @ stub D3DCreateFunctionLinkingGraph -@ stub D3DCreateLinker +@ stdcall D3DCreateLinker(ptr) @ stub D3DDecompressShaders @ stdcall D3DDisassemble(ptr long long ptr ptr) @ stub D3DDisassemble10Effect(ptr long ptr) diff --git a/include/d3d11shader.h b/include/d3d11shader.h index a7441508146..225c4344100 100644 --- a/include/d3d11shader.h +++ b/include/d3d11shader.h @@ -261,4 +261,20 @@ DECLARE_INTERFACE_(ID3D11Module, IUnknown) }; #undef INTERFACE
+DEFINE_GUID(IID_ID3D11Linker, 0x59a6cd0e, 0xe10d, 0x4c1f, 0x88, 0xc0, 0x63, 0xab, 0xa1, 0xda, 0xf3, 0x0e); + +#define INTERFACE ID3D11Linker +DECLARE_INTERFACE_(ID3D11Linker, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* ID3D11Linker methods */ + STDMETHOD(Link)(THIS_ ID3D11ModuleInstance *instance, LPCSTR instname, LPCSTR targetname, UINT flags, ID3DBlob **shader, ID3DBlob **error) PURE; + STDMETHOD(UseLibrary)(THIS_ ID3D11ModuleInstance *libinstance) PURE; + STDMETHOD(AddClipPlaneFromCBuffer)(THIS_ UINT bufferslot, UINT bufferentry) PURE; +}; +#undef INTERFACE + #endif diff --git a/include/d3dcompiler.h b/include/d3dcompiler.h index f897a785992..87821a9031a 100644 --- a/include/d3dcompiler.h +++ b/include/d3dcompiler.h @@ -153,6 +153,7 @@ typedef HRESULT (WINAPI *pD3DPreprocess)(const void *data, SIZE_T size, const ch const D3D_SHADER_MACRO *defines, ID3DInclude *include, ID3DBlob **shader, ID3DBlob **error_messages);
+HRESULT WINAPI D3DCreateLinker(ID3D11Linker **linker); HRESULT WINAPI D3DLoadModule(const void *data, SIZE_T size, ID3D11Module **module);
#ifdef __cplusplus
On Tue Mar 19 07:26:11 2024 +0000, Vijay Kiran Kamuju wrote:
changed this line in [version 3 of the diff](/wine/wine/-/merge_requests/5336/diffs?diff_id=105869&start_sha=b9e40d35413cbf6ad6677e55c2ab33a55e143438#3ca63ee36cbd0f62840ba9d2bfd805db5ad3eaa0_274_274)
Typo, fixed
On Tue Mar 19 07:26:12 2024 +0000, Vijay Kiran Kamuju wrote:
changed this line in [version 3 of the diff](/wine/wine/-/merge_requests/5336/diffs?diff_id=105869&start_sha=b9e40d35413cbf6ad6677e55c2ab33a55e143438#3ca63ee36cbd0f62840ba9d2bfd805db5ad3eaa0_275_274)
Typo, fixed.
On Tue Mar 19 07:33:43 2024 +0000, Matteo Bruni wrote:
Does this actually help with the referenced bug?
Yes, it's a test to run the function D3DCreateLinker and it doesn't use the out object created. I have the checked source code of the test, url provided in the bug report. I believe the test is to check the availability and return code of it.
On Tue Mar 19 19:19:01 2024 +0000, Vijay Kiran Kamuju wrote:
Yes, it's a test to run the function D3DCreateLinker and it doesn't use the out object created. I have the checked source code of the test, url provided in the bug report. I believe the test is to check the availability and return code of it.
If it's checking the return code, it's still not going to pass?
On Tue Mar 19 19:19:01 2024 +0000, Matteo Bruni wrote:
If it's checking the return code, it's still not going to pass?
The rust test fails elegantly rather than going into wine stacktrace. If the test fails with a wine stacktrace complaining about unimplemented function, the other test(s) in it will not execute.