1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! Mappings for the content of d3d11on12.h
8 use shared
::guiddef
::IID
;
9 use shared
::minwindef
::UINT
;
10 use um
::d3d11
::{ID3D11Device, ID3D11DeviceContext, ID3D11Resource}
;
11 use um
::d3d12
::D3D12_RESOURCE_STATES
;
12 use um
::d3dcommon
::D3D_FEATURE_LEVEL
;
13 use um
::unknwnbase
::{IUnknown, IUnknownVtbl}
;
14 use um
::winnt
::HRESULT
;
15 FN
!{stdcall
PFN_D3D11ON12_CREATE_DEVICE(
18 *const D3D_FEATURE_LEVEL
,
23 *mut *mut ID3D11Device
,
24 *mut *mut ID3D11DeviceContext
,
25 *mut D3D_FEATURE_LEVEL
,
28 pub fn D3D11On12CreateDevice(
29 pDevice
: *mut IUnknown
,
31 pFeatureLevels
: *const D3D_FEATURE_LEVEL
,
33 ppCommandQueues
: *mut *mut IUnknown
,
36 ppDevice
: *mut *mut ID3D11Device
,
37 ppImmediateContext
: *mut *mut ID3D11DeviceContext
,
38 pChosenFeatureLevel
: *mut D3D_FEATURE_LEVEL
,
41 STRUCT
!{struct D3D11_RESOURCE_FLAGS
{
45 StructureByteStride
: UINT
,
47 RIDL
!{#[uuid(0x85611e73, 0x70a9, 0x490e, 0x96, 0x14, 0xa9, 0xe3, 0x02, 0x77, 0x79, 0x04)]
48 interface
ID3D11On12Device(ID3D11On12DeviceVtbl
): IUnknown(IUnknownVtbl
) {
49 fn CreateWrappedResource(
50 pResource12
: *mut IUnknown
,
51 pFlags11
: *const D3D11_RESOURCE_FLAGS
,
52 InState
: D3D12_RESOURCE_STATES
,
53 OutState
: D3D12_RESOURCE_STATES
,
55 ppResource11
: *mut *mut c_void
,
57 fn ReleaseWrappedResources(
58 ppResources
: *mut *mut ID3D11Resource
,
61 fn AcquireWrappedResources(
62 ppResources
: *mut *mut ID3D11Resource
,
66 DEFINE_GUID
!{IID_ID3D11On12Device
,
67 0x85611e73, 0x70a9, 0x490e, 0x96, 0x14, 0xa9, 0xe3, 0x02, 0x77, 0x79, 0x04}