Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/directx_headers/patches/0002-win7-8-dynamic-load.patch
9903 views
1
diff --git a/thirdparty/directx_headers/include/directx/d3dx12_root_signature.h b/thirdparty/directx_headers/include/directx/d3dx12_root_signature.h
2
index 572efed852..2da79d10f1 100644
3
--- a/thirdparty/directx_headers/include/directx/d3dx12_root_signature.h
4
+++ b/thirdparty/directx_headers/include/directx/d3dx12_root_signature.h
5
@@ -996,6 +996,7 @@ struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE
6
// two code paths for building root signatures, this helper method reconstructs a 1.0 signature when
7
// 1.1 is not supported.
8
inline HRESULT D3DX12SerializeVersionedRootSignature(
9
+ _In_ HMODULE pLibD3D12,
10
_In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignatureDesc,
11
D3D_ROOT_SIGNATURE_VERSION MaxVersion,
12
_Outptr_ ID3DBlob** ppBlob,
13
@@ -1006,13 +1007,18 @@ inline HRESULT D3DX12SerializeVersionedRootSignature(
14
*ppErrorBlob = nullptr;
15
}
16
17
+ PFN_D3D12_SERIALIZE_ROOT_SIGNATURE d3d_D3D12SerializeRootSignature = (PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(void *)GetProcAddress(pLibD3D12, "D3D12SerializeRootSignature");
18
+ if (d3d_D3D12SerializeRootSignature == nullptr) {
19
+ return E_INVALIDARG;
20
+ }
21
+ PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE d3d_D3D12SerializeVersionedRootSignature = (PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE)(void *)GetProcAddress(pLibD3D12, "D3D12SerializeVersionedRootSignature");
22
switch (MaxVersion)
23
{
24
case D3D_ROOT_SIGNATURE_VERSION_1_0:
25
switch (pRootSignatureDesc->Version)
26
{
27
case D3D_ROOT_SIGNATURE_VERSION_1_0:
28
- return D3D12SerializeRootSignature(&pRootSignatureDesc->Desc_1_0, D3D_ROOT_SIGNATURE_VERSION_1, ppBlob, ppErrorBlob);
29
+ return d3d_D3D12SerializeRootSignature(&pRootSignatureDesc->Desc_1_0, D3D_ROOT_SIGNATURE_VERSION_1, ppBlob, ppErrorBlob);
30
31
case D3D_ROOT_SIGNATURE_VERSION_1_1:
32
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
33
@@ -1114,7 +1120,7 @@ inline HRESULT D3DX12SerializeVersionedRootSignature(
34
if (SUCCEEDED(hr))
35
{
36
const CD3DX12_ROOT_SIGNATURE_DESC desc_1_0(desc_1_1.NumParameters, pParameters_1_0, desc_1_1.NumStaticSamplers, pStaticSamplers == nullptr ? desc_1_1.pStaticSamplers : pStaticSamplers, desc_1_1.Flags);
37
- hr = D3D12SerializeRootSignature(&desc_1_0, D3D_ROOT_SIGNATURE_VERSION_1, ppBlob, ppErrorBlob);
38
+ hr = d3d_D3D12SerializeRootSignature(&desc_1_0, D3D_ROOT_SIGNATURE_VERSION_1, ppBlob, ppErrorBlob);
39
}
40
41
if (pParameters)
42
@@ -1145,7 +1151,7 @@ inline HRESULT D3DX12SerializeVersionedRootSignature(
43
{
44
case D3D_ROOT_SIGNATURE_VERSION_1_0:
45
case D3D_ROOT_SIGNATURE_VERSION_1_1:
46
- return D3D12SerializeVersionedRootSignature(pRootSignatureDesc, ppBlob, ppErrorBlob);
47
+ return d3d_D3D12SerializeVersionedRootSignature(pRootSignatureDesc, ppBlob, ppErrorBlob);
48
49
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
50
case D3D_ROOT_SIGNATURE_VERSION_1_2:
51
@@ -1181,7 +1187,7 @@ inline HRESULT D3DX12SerializeVersionedRootSignature(
52
if (SUCCEEDED(hr))
53
{
54
const CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC desc(desc_1_1.NumParameters, desc_1_1.pParameters, desc_1_1.NumStaticSamplers, pStaticSamplers == nullptr ? desc_1_1.pStaticSamplers : pStaticSamplers, desc_1_1.Flags);
55
- hr = D3D12SerializeVersionedRootSignature(&desc, ppBlob, ppErrorBlob);
56
+ hr = d3d_D3D12SerializeVersionedRootSignature(&desc, ppBlob, ppErrorBlob);
57
}
58
59
if (pStaticSamplers)
60
@@ -1197,7 +1203,7 @@ inline HRESULT D3DX12SerializeVersionedRootSignature(
61
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
62
case D3D_ROOT_SIGNATURE_VERSION_1_2:
63
#endif
64
- return D3D12SerializeVersionedRootSignature(pRootSignatureDesc, ppBlob, ppErrorBlob);
65
+ return d3d_D3D12SerializeVersionedRootSignature(pRootSignatureDesc, ppBlob, ppErrorBlob);
66
}
67
68
return E_INVALIDARG;
69
70