Repository navigation
Expand file tree
/
Copy pathd3d12_proxy.cpp
More file actions
106 lines (95 loc) · 4.07 KB
/
Copy pathd3d12_proxy.cpp
File metadata and controls
106 lines (95 loc) · 4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#include "pch.h"
#include "config.h"
#include <d3d12.h>
HRESULT
WINAPI
D3D12CreateDevice (
_In_opt_ IUnknown* pAdapter,
D3D_FEATURE_LEVEL MinimumFeatureLevel,
_In_ REFIID riid, // Expected: ID3D12Device
_COM_Outptr_opt_ void** ppDevice )
{
static PFN_D3D12_CREATE_DEVICE _D3D12CreateDevice =
(PFN_D3D12_CREATE_DEVICE)GetProcAddress (LoadLibraryExW (config.wszPathToSystemD3D12, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32),
"D3D12CreateDevice");
return
_D3D12CreateDevice (pAdapter, MinimumFeatureLevel, riid, ppDevice);
}
HRESULT
WINAPI
D3D12GetDebugInterface (
_In_ REFIID riid, _COM_Outptr_opt_ void** ppvDebug )
{
static PFN_D3D12_GET_DEBUG_INTERFACE _D3D12GetDebugInterface =
(PFN_D3D12_GET_DEBUG_INTERFACE)GetProcAddress (LoadLibraryExW (config.wszPathToSystemD3D12, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32),
"D3D12GetDebugInterface");
return
_D3D12GetDebugInterface (riid, ppvDebug);
}
HRESULT
WINAPI
D3D12CreateRootSignatureDeserializer (
_In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData,
_In_ SIZE_T SrcDataSizeInBytes,
_In_ REFIID pRootSignatureDeserializerInterface,
_Out_ void** ppRootSignatureDeserializer )
{
static PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER _D3D12CreateRootSignatureDeserializer =
(PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER)GetProcAddress (LoadLibraryExW (config.wszPathToSystemD3D12, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32),
"D3D12CreateRootSignatureDeserializer");
return
_D3D12CreateRootSignatureDeserializer (pSrcData, SrcDataSizeInBytes, pRootSignatureDeserializerInterface, ppRootSignatureDeserializer);
}
HRESULT
WINAPI
D3D12CreateVersionedRootSignatureDeserializer (
_In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData,
_In_ SIZE_T SrcDataSizeInBytes,
_In_ REFIID pRootSignatureDeserializerInterface,
_Out_ void** ppRootSignatureDeserializer )
{
static PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER _D3D12CreateVersionedRootSignatureDeserializer =
(PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER)GetProcAddress (LoadLibraryExW (config.wszPathToSystemD3D12, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32),
"D3D12CreateVersionedRootSignatureDeserializer");
return
_D3D12CreateVersionedRootSignatureDeserializer (pSrcData, SrcDataSizeInBytes, pRootSignatureDeserializerInterface, ppRootSignatureDeserializer);
}
HRESULT
WINAPI
D3D12GetInterface ( _In_ REFCLSID rclsid, _In_ REFIID riid, _COM_Outptr_opt_ void** ppvDebug )
{
static PFN_D3D12_GET_INTERFACE _D3D12GetInterface =
(PFN_D3D12_GET_INTERFACE)GetProcAddress (LoadLibraryExW (config.wszPathToSystemD3D12, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32),
"D3D12GetInterface");
return
_D3D12GetInterface (rclsid, riid, ppvDebug);
}
HRESULT
WINAPI
D3D12SerializeRootSignature (
_In_ const D3D12_ROOT_SIGNATURE_DESC* pRootSignature,
_In_ D3D_ROOT_SIGNATURE_VERSION Version,
_Out_ ID3DBlob** ppBlob,
_Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob )
{
static PFN_D3D12_SERIALIZE_ROOT_SIGNATURE _D3D12SerializeRootSignature =
(PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)GetProcAddress (LoadLibraryExW (config.wszPathToSystemD3D12, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32),
"D3D12SerializeRootSignature");
return
_D3D12SerializeRootSignature (pRootSignature, Version, ppBlob, ppErrorBlob);
}
HRESULT
WINAPI
D3D12SerializeVersionedRootSignature (
_In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *pRootSignature,
_Out_ ID3DBlob **ppBlob,
_Out_opt_ ID3DBlob **ppErrorBlob )
{
static PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE _D3D12SerializeVersionedRootSignature =
(PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE)GetProcAddress (LoadLibraryExW (config.wszPathToSystemD3D12, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32),
"D3D12SerializeVersionedRootSignature");
return
_D3D12SerializeVersionedRootSignature (pRootSignature, ppBlob, ppErrorBlob);
}
// D3D12DeviceRemovedExtendedData ???
// D3D12EnableExperimentalFeatures ???