From 65368fd24d4e647145e0dfff43c60f0ac0c108e1 Mon Sep 17 00:00:00 2001 From: Bryan Bernhart Date: Sat, 16 Jul 2022 11:06:32 -0700 Subject: [PATCH] Make Heap::Heap private. --- src/gpgmm/d3d12/HeapD3D12.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/gpgmm/d3d12/HeapD3D12.h b/src/gpgmm/d3d12/HeapD3D12.h index 2a4091299..40e1ad4ef 100644 --- a/src/gpgmm/d3d12/HeapD3D12.h +++ b/src/gpgmm/d3d12/HeapD3D12.h @@ -78,7 +78,7 @@ namespace gpgmm::d3d12 { /** \brief Created alignment of the heap, in bytes. - Must be non-zero + Must be non-zero. */ uint64_t Alignment; @@ -131,10 +131,10 @@ namespace gpgmm::d3d12 { node is removed from the cache when it is evicted from video memory due to budget constraints, or when the memory is released. */ - class GPGMM_EXPORT Heap : public MemoryBase, - public DebugObject, - public IUnknownImpl, - public LinkNode { + class GPGMM_EXPORT Heap final : public MemoryBase, + public DebugObject, + public IUnknownImpl, + public LinkNode { public: /** \brief Create a heap managed by GPGMM. @@ -153,13 +153,6 @@ namespace gpgmm::d3d12 { CreateHeapFn&& createHeapFn, Heap** ppHeapOut); - // TODO: Make private. - Heap(ComPtr pageable, - const DXGI_MEMORY_SEGMENT_GROUP& memorySegmentGroup, - uint64_t size, - uint64_t alignment = kInvalidSize, - bool isExternal = false); - ~Heap() override; /** \brief Returns a ComPtr object that represents the interface specified. @@ -199,6 +192,12 @@ namespace gpgmm::d3d12 { friend ResidencyManager; friend ResourceAllocator; + Heap(ComPtr pageable, + const DXGI_MEMORY_SEGMENT_GROUP& memorySegmentGroup, + uint64_t size, + uint64_t alignment, + bool isExternal); + HRESULT SetDebugNameImpl(const std::string& name) override; const char* GetTypename() const; DXGI_MEMORY_SEGMENT_GROUP GetMemorySegmentGroup() const;