Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/d3d12ma/patches/0001-mingw-support.patch
9904 views
1
diff --git a/thirdparty/d3d12ma/D3D12MemAlloc.cpp b/thirdparty/d3d12ma/D3D12MemAlloc.cpp
2
index 8e2488091a..80d910e694 100644
3
--- a/thirdparty/d3d12ma/D3D12MemAlloc.cpp
4
+++ b/thirdparty/d3d12ma/D3D12MemAlloc.cpp
5
@@ -33,6 +33,12 @@
6
#include <shared_mutex>
7
#endif
8
9
+#if !defined(_MSC_VER)
10
+#include <guiddef.h>
11
+
12
+#include <dxguids.h>
13
+#endif
14
+
15
////////////////////////////////////////////////////////////////////////////////
16
////////////////////////////////////////////////////////////////////////////////
17
//
18
@@ -8178,7 +8184,13 @@ HRESULT AllocatorPimpl::UpdateD3D12Budget()
19
20
D3D12_RESOURCE_ALLOCATION_INFO AllocatorPimpl::GetResourceAllocationInfoNative(const D3D12_RESOURCE_DESC& resourceDesc) const
21
{
22
+#if defined(_MSC_VER) || !defined(_WIN32)
23
return m_Device->GetResourceAllocationInfo(0, 1, &resourceDesc);
24
+#else
25
+ D3D12_RESOURCE_ALLOCATION_INFO ret;
26
+ m_Device->GetResourceAllocationInfo(&ret, 0, 1, &resourceDesc);
27
+ return ret;
28
+#endif
29
}
30
31
#ifdef __ID3D12Device8_INTERFACE_DEFINED__
32
@@ -8186,7 +8198,13 @@ D3D12_RESOURCE_ALLOCATION_INFO AllocatorPimpl::GetResourceAllocationInfoNative(c
33
{
34
D3D12MA_ASSERT(m_Device8 != NULL);
35
D3D12_RESOURCE_ALLOCATION_INFO1 info1Unused;
36
+#if defined(_MSC_VER) || !defined(_WIN32)
37
return m_Device8->GetResourceAllocationInfo2(0, 1, &resourceDesc, &info1Unused);
38
+#else
39
+ D3D12_RESOURCE_ALLOCATION_INFO ret;
40
+ m_Device8->GetResourceAllocationInfo2(&ret, 0, 1, &resourceDesc, &info1Unused);
41
+ return ret;
42
+#endif
43
}
44
#endif // #ifdef __ID3D12Device8_INTERFACE_DEFINED__
45
46
47