Debian Codegraph @

thirdparty/directx_headers/patches/0001-win7-8-dynamic-load.patch

raw
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 e194d30a3f..bf9a2c9101 100644
3 --- a/thirdparty/directx_headers/include/directx/d3dx12_root_signature.h
4 +++ b/thirdparty/directx_headers/include/directx/d3dx12_root_signature.h
5 @@ -1001,6 +1001,7 @@ struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE
6 #endif
7
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 @@ -1011,13 +1012,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 @@ -1125,7 +1131,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 @@ -1159,7 +1165,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 @@ -1195,7 +1201,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 @@ -1216,7 +1222,7 @@ inline HRESULT D3DX12SerializeVersionedRootSignature(
61 case D3D_ROOT_SIGNATURE_VERSION_1_2:
62 #endif
63 default:
64 - return D3D12SerializeVersionedRootSignature(pRootSignatureDesc, ppBlob, ppErrorBlob);
65 + return d3d_D3D12SerializeVersionedRootSignature(pRootSignatureDesc, ppBlob, ppErrorBlob);
66 }
67
68 return E_INVALIDARG;