diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2023-12-19 12:48:02 +0100 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2023-12-20 19:18:08 +0100 |
commit | 12a519bae232e2e4a37a243a4050edaa0d802687 (patch) | |
tree | 0a0bdd4d2bc8ecf34b7382c08c5072bf2ee8001d /thirdparty/d3d12ma | |
parent | 0567c5df9f6fbd3f3237de38b36a8474a9a9b03b (diff) | |
download | redot-engine-12a519bae232e2e4a37a243a4050edaa0d802687.tar.gz |
Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts
Credit and thanks to @bruzvg for multiple build fixes, update of 3rd-party items and MinGW support.
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Diffstat (limited to 'thirdparty/d3d12ma')
-rw-r--r-- | thirdparty/d3d12ma/D3D12MemAlloc.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/thirdparty/d3d12ma/D3D12MemAlloc.cpp b/thirdparty/d3d12ma/D3D12MemAlloc.cpp index 8e2488091a..4d19e0e727 100644 --- a/thirdparty/d3d12ma/D3D12MemAlloc.cpp +++ b/thirdparty/d3d12ma/D3D12MemAlloc.cpp @@ -33,6 +33,14 @@ #include <shared_mutex> #endif +/* GODOT start */ +#if !defined(_MSC_VER) +#include <guiddef.h> + +#include <dxguids.h> +#endif +/* GODOT end */ + //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // @@ -8178,7 +8186,15 @@ 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 + D3D12_RESOURCE_ALLOCATION_INFO ret; + m_Device->GetResourceAllocationInfo(&ret, 0, 1, &resourceDesc); + return ret; +#endif +/* GODOT end */ } #ifdef __ID3D12Device8_INTERFACE_DEFINED__ @@ -8186,7 +8202,15 @@ 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 + D3D12_RESOURCE_ALLOCATION_INFO ret; + m_Device8->GetResourceAllocationInfo2(&ret, 0, 1, &resourceDesc, &info1Unused); + return ret; +#endif +/* GODOT end */ } #endif // #ifdef __ID3D12Device8_INTERFACE_DEFINED__ |