CMake support added for building with MinGW (#275)

This commit is contained in:
Chuck Walbourn
2022-05-05 14:50:13 -07:00
committed by GitHub
parent 24c1415c9a
commit 9c72f2c6cd
26 changed files with 229 additions and 151 deletions

View File

@@ -57,7 +57,11 @@
#define D3DX12_NO_STATE_OBJECT_HELPERS
#define D3DX12_NO_CHECK_FEATURE_SUPPORT_CLASS
#ifdef USING_DIRECTX_HEADERS
#include "directx/d3dx12.h"
#else
#include "d3dx12.h"
#endif
using namespace DirectX;
using Microsoft::WRL::ComPtr;
@@ -197,16 +201,18 @@ namespace
}
//---------------------------------------------------------------------------------
#if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D12DeviceChild* resource, _In_z_ const wchar_t(&name)[TNameLength]) noexcept
{
#if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
resource->SetName(name);
#else
UNREFERENCED_PARAMETER(resource);
UNREFERENCED_PARAMETER(name);
#endif
}
#else
template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D12DeviceChild*, _In_z_ const wchar_t(&)[TNameLength]) noexcept
{
}
#endif
inline uint32_t CountMips(uint32_t width, uint32_t height) noexcept
{