mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-21 19:50:05 +00:00
Merge pull request #43 from PixelCatalyst/fix_atomic_initialization
Use list initialization for atomics
This commit is contained in:
commit
f0458801c4
@ -145,7 +145,7 @@ public:
|
||||
protected:
|
||||
virtual void ReleaseThis() { delete this; }
|
||||
private:
|
||||
D3D12MA_ATOMIC_UINT32 m_RefCount = 1;
|
||||
D3D12MA_ATOMIC_UINT32 m_RefCount = {1};
|
||||
};
|
||||
} // namespace D3D12MA
|
||||
|
||||
|
@ -6120,7 +6120,7 @@ private:
|
||||
D3D12MA_ATOMIC_UINT64 m_BlockBytes[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
|
||||
D3D12MA_ATOMIC_UINT64 m_AllocationBytes[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
|
||||
|
||||
D3D12MA_ATOMIC_UINT32 m_OperationsSinceBudgetFetch = 0;
|
||||
D3D12MA_ATOMIC_UINT32 m_OperationsSinceBudgetFetch = {0};
|
||||
D3D12MA_RW_MUTEX m_BudgetMutex;
|
||||
UINT64 m_D3D12Usage[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
|
||||
UINT64 m_D3D12Budget[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
|
||||
@ -6355,7 +6355,7 @@ class AllocatorPimpl
|
||||
friend class Allocator;
|
||||
friend class Pool;
|
||||
public:
|
||||
std::atomic_uint32_t m_RefCount = 1;
|
||||
std::atomic_uint32_t m_RefCount = {1};
|
||||
CurrentBudgetData m_Budget;
|
||||
|
||||
AllocatorPimpl(const ALLOCATION_CALLBACKS& allocationCallbacks, const ALLOCATOR_DESC& desc);
|
||||
|
Loading…
Reference in New Issue
Block a user