Thirdparty: Harmonize patches to document downstream changes
This commit is contained in:
6
thirdparty/d3d12ma/D3D12MemAlloc.cpp
vendored
6
thirdparty/d3d12ma/D3D12MemAlloc.cpp
vendored
@ -33,13 +33,11 @@
|
||||
#include <shared_mutex>
|
||||
#endif
|
||||
|
||||
/* GODOT start */
|
||||
#if !defined(_MSC_VER)
|
||||
#include <guiddef.h>
|
||||
|
||||
#include <dxguids.h>
|
||||
#endif
|
||||
/* GODOT end */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -8186,7 +8184,6 @@ HRESULT AllocatorPimpl::UpdateD3D12Budget()
|
||||
|
||||
D3D12_RESOURCE_ALLOCATION_INFO AllocatorPimpl::GetResourceAllocationInfoNative(const D3D12_RESOURCE_DESC& resourceDesc) const
|
||||
{
|
||||
/* GODOT start */
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
return m_Device->GetResourceAllocationInfo(0, 1, &resourceDesc);
|
||||
#else
|
||||
@ -8194,7 +8191,6 @@ D3D12_RESOURCE_ALLOCATION_INFO AllocatorPimpl::GetResourceAllocationInfoNative(c
|
||||
m_Device->GetResourceAllocationInfo(&ret, 0, 1, &resourceDesc);
|
||||
return ret;
|
||||
#endif
|
||||
/* GODOT end */
|
||||
}
|
||||
|
||||
#ifdef __ID3D12Device8_INTERFACE_DEFINED__
|
||||
@ -8202,7 +8198,6 @@ D3D12_RESOURCE_ALLOCATION_INFO AllocatorPimpl::GetResourceAllocationInfoNative(c
|
||||
{
|
||||
D3D12MA_ASSERT(m_Device8 != NULL);
|
||||
D3D12_RESOURCE_ALLOCATION_INFO1 info1Unused;
|
||||
/* GODOT start */
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
return m_Device8->GetResourceAllocationInfo2(0, 1, &resourceDesc, &info1Unused);
|
||||
#else
|
||||
@ -8210,7 +8205,6 @@ D3D12_RESOURCE_ALLOCATION_INFO AllocatorPimpl::GetResourceAllocationInfoNative(c
|
||||
m_Device8->GetResourceAllocationInfo2(&ret, 0, 1, &resourceDesc, &info1Unused);
|
||||
return ret;
|
||||
#endif
|
||||
/* GODOT end */
|
||||
}
|
||||
#endif // #ifdef __ID3D12Device8_INTERFACE_DEFINED__
|
||||
|
||||
|
||||
45
thirdparty/d3d12ma/patches/0001-mingw-support.patch
vendored
Normal file
45
thirdparty/d3d12ma/patches/0001-mingw-support.patch
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
diff --git a/thirdparty/d3d12ma/D3D12MemAlloc.cpp b/thirdparty/d3d12ma/D3D12MemAlloc.cpp
|
||||
index 8e2488091a..80d910e694 100644
|
||||
--- a/thirdparty/d3d12ma/D3D12MemAlloc.cpp
|
||||
+++ b/thirdparty/d3d12ma/D3D12MemAlloc.cpp
|
||||
@@ -33,6 +33,12 @@
|
||||
#include <shared_mutex>
|
||||
#endif
|
||||
|
||||
+#if !defined(_MSC_VER)
|
||||
+#include <guiddef.h>
|
||||
+
|
||||
+#include <dxguids.h>
|
||||
+#endif
|
||||
+
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -8178,7 +8184,13 @@ HRESULT AllocatorPimpl::UpdateD3D12Budget()
|
||||
|
||||
D3D12_RESOURCE_ALLOCATION_INFO AllocatorPimpl::GetResourceAllocationInfoNative(const D3D12_RESOURCE_DESC& resourceDesc) const
|
||||
{
|
||||
+#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
return m_Device->GetResourceAllocationInfo(0, 1, &resourceDesc);
|
||||
+#else
|
||||
+ D3D12_RESOURCE_ALLOCATION_INFO ret;
|
||||
+ m_Device->GetResourceAllocationInfo(&ret, 0, 1, &resourceDesc);
|
||||
+ return ret;
|
||||
+#endif
|
||||
}
|
||||
|
||||
#ifdef __ID3D12Device8_INTERFACE_DEFINED__
|
||||
@@ -8186,7 +8198,13 @@ D3D12_RESOURCE_ALLOCATION_INFO AllocatorPimpl::GetResourceAllocationInfoNative(c
|
||||
{
|
||||
D3D12MA_ASSERT(m_Device8 != NULL);
|
||||
D3D12_RESOURCE_ALLOCATION_INFO1 info1Unused;
|
||||
+#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
return m_Device8->GetResourceAllocationInfo2(0, 1, &resourceDesc, &info1Unused);
|
||||
+#else
|
||||
+ D3D12_RESOURCE_ALLOCATION_INFO ret;
|
||||
+ m_Device8->GetResourceAllocationInfo2(&ret, 0, 1, &resourceDesc, &info1Unused);
|
||||
+ return ret;
|
||||
+#endif
|
||||
}
|
||||
#endif // #ifdef __ID3D12Device8_INTERFACE_DEFINED__
|
||||
|
||||
Reference in New Issue
Block a user