Forspoken checks for the existence of this DLL.
-- v5: d3d12core: Add stub DLL.
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- include/d3d12.idl | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/d3d12.idl b/include/d3d12.idl index 082a436c9ec..7cd69308532 100644 --- a/include/d3d12.idl +++ b/include/d3d12.idl @@ -66,6 +66,7 @@ const UINT D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT = 256; const UINT D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 4194304; const UINT D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT = 65536; const UINT D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT = 16; +const UINT D3D12_SDK_VERSION = 4; const UINT D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 65536; const UINT D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = 4096; const UINT D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4; @@ -2589,3 +2590,12 @@ typedef HRESULT (__stdcall *PFN_D3D12_GET_DEBUG_INTERFACE)(REFIID iid, void **de
[local] HRESULT __stdcall D3D12EnableExperimentalFeatures(UINT feature_count, const IID *iids, void *configurations, UINT *configurations_sizes); + +cpp_quote("DEFINE_GUID(CLSID_D3D12Debug, 0xf2352aeb, 0xdd84, 0x49fe, 0xb9, 0x7b, 0xa9, 0xdc, 0xfd, 0xcc, 0x1b, 0x4f);") +cpp_quote("DEFINE_GUID(CLSID_D3D12Tools, 0xe38216b1, 0x3c8c, 0x4833, 0xaa, 0x09, 0x0a, 0x06, 0xb6, 0x5d, 0x96, 0xc8);") +cpp_quote("DEFINE_GUID(CLSID_D3D12DeviceRemovedExtendedData, 0x4a75bbc4, 0x9ff4, 0x4ad8, 0x9f, 0x18, 0xab, 0xae, 0x84, 0xdc, 0x5f, 0xf2);") +cpp_quote("DEFINE_GUID(CLSID_D3D12SDKConfiguration, 0x7cda6aca, 0xa03e, 0x49c8, 0x94, 0x58, 0x03, 0x34, 0xd2, 0x0e, 0x07, 0xce);") + +typedef HRESULT (__stdcall *PFN_D3D12_GET_INTERFACE)(REFCLSID clsid, REFIID iid, void **debug ); + +[local] HRESULT __stdcall D3D12GetInterface(REFCLSID clsid, REFIID iid, void **debug);
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
Forspoken checks for the existence of this DLL. --- MAINTAINERS | 1 + configure.ac | 2 ++ dlls/d3d12core/Makefile.in | 8 +++++++ dlls/d3d12core/d3d12core.spec | 2 ++ dlls/d3d12core/main.c | 30 ++++++++++++++++++++++++++ dlls/d3d12core/tests/Makefile.in | 5 +++++ dlls/d3d12core/tests/d3d12core.c | 36 ++++++++++++++++++++++++++++++++ dlls/d3d12core/version.rc | 26 +++++++++++++++++++++++ 8 files changed, 110 insertions(+) create mode 100644 dlls/d3d12core/Makefile.in create mode 100644 dlls/d3d12core/d3d12core.spec create mode 100644 dlls/d3d12core/main.c create mode 100644 dlls/d3d12core/tests/Makefile.in create mode 100644 dlls/d3d12core/tests/d3d12core.c create mode 100644 dlls/d3d12core/version.rc
diff --git a/MAINTAINERS b/MAINTAINERS index 276471287da..49d88dc0cb3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -72,6 +72,7 @@ P: Matteo Bruni mbruni@codeweavers.com F: dlls/d3d10core/ F: dlls/d3d11/ F: dlls/d3d12/ +F: dlls/d3d12core/ F: dlls/d3d8/ F: dlls/d3d9/ F: dlls/d3drm/ diff --git a/configure.ac b/configure.ac index 9ff7c5e8914..42c5a4f8071 100644 --- a/configure.ac +++ b/configure.ac @@ -2432,6 +2432,8 @@ WINE_CONFIG_MAKEFILE(dlls/d3d11) WINE_CONFIG_MAKEFILE(dlls/d3d11/tests) WINE_CONFIG_MAKEFILE(dlls/d3d12) WINE_CONFIG_MAKEFILE(dlls/d3d12/tests) +WINE_CONFIG_MAKEFILE(dlls/d3d12core) +WINE_CONFIG_MAKEFILE(dlls/d3d12core/tests) WINE_CONFIG_MAKEFILE(dlls/d3d8) WINE_CONFIG_MAKEFILE(dlls/d3d8/tests) WINE_CONFIG_MAKEFILE(dlls/d3d8thk) diff --git a/dlls/d3d12core/Makefile.in b/dlls/d3d12core/Makefile.in new file mode 100644 index 00000000000..61f169c3972 --- /dev/null +++ b/dlls/d3d12core/Makefile.in @@ -0,0 +1,8 @@ +MODULE = d3d12core.dll +IMPORTLIB = d3d12core + +C_SRCS = \ + main.c + +RC_SRCS = \ + version.rc diff --git a/dlls/d3d12core/d3d12core.spec b/dlls/d3d12core/d3d12core.spec new file mode 100644 index 00000000000..6e310d68ada --- /dev/null +++ b/dlls/d3d12core/d3d12core.spec @@ -0,0 +1,2 @@ +@ stdcall D3D12GetInterface(ptr ptr ptr) +@ cdecl D3D12SDKVersion() diff --git a/dlls/d3d12core/main.c b/dlls/d3d12core/main.c new file mode 100644 index 00000000000..078e4f3f556 --- /dev/null +++ b/dlls/d3d12core/main.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2023 Mohamad Al-Jaf + * + * 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 "wine/debug.h" +#include "d3d12.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3d12core); + +HRESULT WINAPI D3D12GetInterface( REFCLSID clsid, REFIID iid, void **debug ) +{ + FIXME( "clsid %s, iid %s, debug %p stub!\n", debugstr_guid(clsid), debugstr_guid(iid), debug ); + return DXGI_ERROR_SDK_COMPONENT_MISSING; +} + +DECLSPEC_EXPORT const UINT D3D12SDKVersion = D3D12_SDK_VERSION; diff --git a/dlls/d3d12core/tests/Makefile.in b/dlls/d3d12core/tests/Makefile.in new file mode 100644 index 00000000000..a7e83d94dcf --- /dev/null +++ b/dlls/d3d12core/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = d3d12core.dll +IMPORTS = d3d12core + +C_SRCS = \ + d3d12core.c diff --git a/dlls/d3d12core/tests/d3d12core.c b/dlls/d3d12core/tests/d3d12core.c new file mode 100644 index 00000000000..9d0becf93d4 --- /dev/null +++ b/dlls/d3d12core/tests/d3d12core.c @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2023 Mohamad Al-Jaf + * + * 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 "initguid.h" +#include "d3d12.h" +#include "d3d12sdklayers.h" +#include "wine/test.h" + +static void test_D3D12GetInterface(void) +{ + ID3D12Debug *debug; + HRESULT hr; + + hr = D3D12GetInterface( &CLSID_D3D12Debug, &IID_ID3D12Debug, (void **)&debug ); + ok(hr == DXGI_ERROR_SDK_COMPONENT_MISSING, "Unexpected hr %#lx.\n", hr); +} + +START_TEST(d3d12core) +{ + test_D3D12GetInterface(); +} diff --git a/dlls/d3d12core/version.rc b/dlls/d3d12core/version.rc new file mode 100644 index 00000000000..9e0f540e7d9 --- /dev/null +++ b/dlls/d3d12core/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2023 Mohamad Al-Jaf + * + * 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 + */ + +#define WINE_FILEDESCRIPTION_STR "Wine Direct3D 12 Core Runtime" +#define WINE_FILENAME_STR "d3d12core.dll" +#define WINE_FILEVERSION 10,0,18363,1350 +#define WINE_FILEVERSION_STR "10.0.18363.1350" +#define WINE_PRODUCTVERSION 10,0,18363,1350 +#define WINE_PRODUCTVERSION_STR "10.0.18363.1350" + +#include "wine/wine_common_ver.rc"
v5 - Add d3d12core to the MAINTAINERS file.
+DECLSPEC_EXPORT const UINT D3D12SDKVersion = D3D12_SDK_VERSION;
We don't use DECLSPEC_EXPORT.
+@ cdecl D3D12SDKVersion()
This is wrong, it should be "@ extern D3D12SDKVersion".
This is one reason to avoid implementing features until they're needed.