From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- include/Makefile.in | 1 + include/d3d9on12.idl | 50 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 include/d3d9on12.idl
diff --git a/include/Makefile.in b/include/Makefile.in index c527a17cec4..0145fe4a7d7 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -138,6 +138,7 @@ SOURCES = \ d3d8types.h \ d3d9.h \ d3d9caps.h \ + d3d9on12.idl \ d3d9types.h \ d3dcaps.h \ d3dcommon.idl \ diff --git a/include/d3d9on12.idl b/include/d3d9on12.idl new file mode 100644 index 00000000000..9eec402a711 --- /dev/null +++ b/include/d3d9on12.idl @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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 + */ + +cpp_quote("#include <d3d9.h>") +import "d3d12.idl"; + +interface IDirect3D9; +interface IDirect3DResource9; + +#define MAX_D3D9ON12_QUEUES 2 + +typedef struct D3D9ON12_ARGS +{ + BOOL Enable9On12; + IUnknown *pD3D12Device; + IUnknown *ppD3D12Queues[MAX_D3D9ON12_QUEUES]; + UINT NumQueues; + UINT NodeMask; +} D3D9ON12_ARGS; + +typedef IDirect3D9 * (__stdcall *PFN_Direct3DCreate9On12)(UINT sdk_version, D3D9ON12_ARGS *override_list, UINT override_entries); +IDirect3D9 * __stdcall Direct3DCreate9On12(UINT,D3D9ON12_ARGS *,UINT); + +typedef struct IDirect3DDevice9On12 *LPDIRECT3DDEVICE9ON12, *PDIRECT3DDEVICE9ON12; + +[ + local, + uuid(e7fda234-b589-4049-940d-8878977531c8) +] +interface IDirect3DDevice9On12 : IUnknown +{ + HRESULT GetD3D12Device (REFIID riid, void **out); + HRESULT UnwrapUnderlyingResource (IDirect3DResource9 *resource, ID3D12CommandQueue *queue, REFIID riid, void **out); + HRESULT ReturnUnderlyingResource (IDirect3DResource9 *resource, UINT num_sync, UINT64 *signal_values, ID3D12Fence **fences); +}