Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions src/gpgmm/d3d12/HeapD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "gpgmm/Debug.h"
#include "gpgmm/d3d12/JSONSerializerD3D12.h"
#include "gpgmm/d3d12/ResidencySetD3D12.h"

namespace gpgmm { namespace d3d12 {
Heap::Heap(ComPtr<ID3D12Pageable> pageable,
Expand Down Expand Up @@ -92,10 +91,6 @@ namespace gpgmm { namespace d3d12 {
return IsInList() || IsResidencyLocked();
}

HRESULT Heap::UpdateResidency(ResidencySet* residencySet) {
return residencySet->Insert(this);
}

HEAP_INFO Heap::GetInfo() const {
return {GetSize(), IsResident(), mMemorySegmentGroup, GetRefCount(), GetPool(), GetHeap()};
}
Expand Down
2 changes: 0 additions & 2 deletions src/gpgmm/d3d12/HeapD3D12.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ namespace gpgmm { namespace d3d12 {

ID3D12Heap* GetHeap() const;

HRESULT UpdateResidency(ResidencySet* residencySet);

bool IsResident() const;

// Testing only.
Expand Down
5 changes: 2 additions & 3 deletions src/gpgmm/d3d12/ResourceAllocationD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "gpgmm/d3d12/HeapD3D12.h"
#include "gpgmm/d3d12/JSONSerializerD3D12.h"
#include "gpgmm/d3d12/ResidencyManagerD3D12.h"
#include "gpgmm/d3d12/ResidencySetD3D12.h"

#include <utility>

Expand Down Expand Up @@ -139,9 +140,7 @@ namespace gpgmm { namespace d3d12 {
}

HRESULT ResourceAllocation::UpdateResidency(ResidencySet* residencySet) const {
Heap* resourceHeap = GetMemory();
ASSERT(resourceHeap != nullptr);
return resourceHeap->UpdateResidency(residencySet);
return residencySet->Insert(GetMemory());
}

bool ResourceAllocation::IsResident() const {
Expand Down