| 1 | 
 /* | 
 
 
 
 
 
 | 2 | 
  * Copyright 2018 Józef Kucia | 
 
 
 
 
 
 | 3 | 
  * | 
 
 
 
 
 
 | 4 | 
  * This library is free software; you can redistribute it and/or | 
 
 
 
 
 
 | 5 | 
  * modify it under the terms of the GNU Lesser General Public | 
 
 
 
 
 
 | 6 | 
  * License as published by the Free Software Foundation; either | 
 
 
 
 
 
 | 7 | 
  * version 2.1 of the License, or (at your option) any later version. | 
 
 
 
 
 
 | 8 | 
  * | 
 
 
 
 
 
 | 9 | 
  * This library is distributed in the hope that it will be useful, | 
 
 
 
 
 
 | 10 | 
  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
 
 
 
 
 
 | 11 | 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
 
 
 
 
 
 | 12 | 
  * Lesser General Public License for more details. | 
 
 
 
 
 
 | 13 | 
  * | 
 
 
 
 
 
 | 14 | 
  * You should have received a copy of the GNU Lesser General Public | 
 
 
 
 
 
 | 15 | 
  * License along with this library; if not, write to the Free Software | 
 
 
 
 
 
 | 16 | 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA | 
 
 
 
 
 
 | 17 | 
  */ | 
 
 
 
 
 
 | 18 | 
  | 
 
 
 
 
 
 | 19 | 
 import "oaidl.idl"; | 
 
 
 
 
 
 | 20 | 
 import "ocidl.idl"; | 
 
 
 
 
 
 | 21 | 
 import "d3d11.idl"; | 
 
 
 
 
 
 | 22 | 
 import "d3d12.idl"; | 
 
 
 
 
 
 | 23 | 
  | 
 
 
 
 
 
 | 24 | 
 typedef struct D3D11_RESOURCE_FLAGS | 
 
 
 
 
 
 | 25 | 
 { | 
 
 
 
 
 
 | 26 | 
     UINT BindFlags; | 
 
 
 
 
 
 | 27 | 
     UINT MiscFlags; | 
 
 
 
 
 
 | 28 | 
     UINT CPUAccessFlags; | 
 
 
 
 
 
 | 29 | 
     UINT StructureByteStride; | 
 
 
 
 
 
 | 30 | 
 } D3D11_RESOURCE_FLAGS; | 
 
 
 
 
 
 | 31 | 
  | 
 
 
 
 
 
 | 32 | 
 [ | 
 
 
 
 
 
 | 33 | 
     uuid(85611e73-70a9-490e-9614-a9e302777904), | 
 
 
 
 
 
 | 34 | 
     object, | 
 
 
 
 
 
 | 35 | 
     local, | 
 
 
 
 
 
 | 36 | 
     pointer_default(unique) | 
 
 
 
 
 
 | 37 | 
 ] | 
 
 
 
 
 
 | 38 | 
 interface ID3D11On12Device : IUnknown | 
 
 
 
 
 
 | 39 | 
 { | 
 
 
 
 
 
 | 40 | 
     HRESULT CreateWrappedResource(IUnknown *d3d12_resource, | 
 
 
 
 
 
 | 41 | 
             const D3D11_RESOURCE_FLAGS *flags, | 
 
 
 
 
 
 | 42 | 
             D3D12_RESOURCE_STATES input_state, | 
 
 
 
 
 
 | 43 | 
             D3D12_RESOURCE_STATES output_state, | 
 
 
 
 
 
 | 44 | 
             REFIID iid, void **d3d11_resource); | 
 
 
 
 
 
 | 45 | 
  | 
 
 
 
 
 
 | 46 | 
     void ReleaseWrappedResources(ID3D11Resource * const *resources, UINT count); | 
 
 
 
 
 
 | 47 | 
  | 
 
 
 
 
 
 | 48 | 
     void AcquireWrappedResources(ID3D11Resource * const *resources, UINT count); | 
 
 
 
 
 
 | 49 | 
 } | 
 
 
 
 
 
 | 50 | 
  | 
 
 
 
 
 
 | 51 | 
 [local] HRESULT __stdcall D3D11On12CreateDevice(IUnknown *device, UINT flags, | 
 
 
 
 
 
 | 52 | 
         const D3D_FEATURE_LEVEL *feature_levels, UINT feature_level_count, | 
 
 
 
 
 
 | 53 | 
         IUnknown * const *queues, UINT queue_count, UINT node_mask, | 
 
 
 
 
 
 | 54 | 
         ID3D11Device **d3d11_device, ID3D11DeviceContext **d3d11_immediate_context, | 
 
 
 
 
 
 | 55 | 
         D3D_FEATURE_LEVEL *obtained_feature_level); | 
 
 
 
 
 
 | 56 | 
  | 
 
 
 
 
 
 | 57 | 
 typedef HRESULT (__stdcall *PFN_D3D11ON12_CREATE_DEVICE)(IUnknown *device, UINT flags, | 
 
 
 
 
 
 | 58 | 
         const D3D_FEATURE_LEVEL *feature_levels, UINT feature_level_count, | 
 
 
 
 
 
 | 59 | 
         IUnknown * const *queues, UINT queue_count, UINT node_mask, | 
 
 
 
 
 
 | 60 | 
         ID3D11Device **d3d11_device, ID3D11DeviceContext **d3d11_immediate_context, | 
 
 
 
 
 
 | 61 | 
         D3D_FEATURE_LEVEL *obtained_feature_level); |