Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions src/gpgmm/d3d12/HeapD3D12.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<Heap> {
class GPGMM_EXPORT Heap final : public MemoryBase,
public DebugObject,
public IUnknownImpl,
public LinkNode<Heap> {
public:
/** \brief Create a heap managed by GPGMM.

Expand All @@ -153,13 +153,6 @@ namespace gpgmm::d3d12 {
CreateHeapFn&& createHeapFn,
Heap** ppHeapOut);

// TODO: Make private.
Heap(ComPtr<ID3D12Pageable> 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.
Expand Down Expand Up @@ -199,6 +192,12 @@ namespace gpgmm::d3d12 {
friend ResidencyManager;
friend ResourceAllocator;

Heap(ComPtr<ID3D12Pageable> 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;
Expand Down