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
3 changes: 0 additions & 3 deletions src/gpgmm/d3d12/DefaultsD3D12.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
namespace gpgmm { namespace d3d12 {

static constexpr uint64_t kDefaultPreferredResourceHeapSize = 4ll * 1024ll * 1024ll; // 4MB
static constexpr uint32_t kDefaultVideoMemoryEvictSize = 50ll * 1024ll * 1024ll; // 50MB
static constexpr float kDefaultMaxVideoMemoryBudget = 0.95f; // 95%

}} // namespace gpgmm::d3d12

#endif // GPGMM_D3D12_DEFAULTSD3D12_H_
3 changes: 3 additions & 0 deletions src/gpgmm/d3d12/ResidencyManagerD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@

namespace gpgmm { namespace d3d12 {

static constexpr uint32_t kDefaultVideoMemoryEvictSize = 50ll * 1024ll * 1024ll; // 50MB
static constexpr float kDefaultMaxVideoMemoryBudget = 0.95f;

// static
HRESULT ResidencyManager::CreateResidencyManager(ComPtr<ID3D12Device> device,
ComPtr<IDXGIAdapter> adapter,
Expand Down
4 changes: 0 additions & 4 deletions src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,10 +951,6 @@ namespace gpgmm { namespace d3d12 {
return S_OK;
}

ResidencyManager* ResourceAllocator::GetResidencyManager() const {
return mResidencyManager.Get();
}

RESOURCE_ALLOCATOR_INFO ResourceAllocator::GetInfo() const {
std::lock_guard<std::mutex> lock(mMutex);

Expand Down
14 changes: 0 additions & 14 deletions src/gpgmm/d3d12/ResourceAllocatorD3D12.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,6 @@ namespace gpgmm { namespace d3d12 {
// exceeds the adapter's GPU virtual address range, it will default to the smaller range.
uint64_t MaxResourceHeapSize;

// Maximum resource size that can be pool-allocated.
//
// Pool-allocating larger resources consumes more memory then smaller ones but is faster to
// create subsequent resources by using a pool of resource heaps. Apps must periodically
// call Trim() to free unused pool-allocated resource heaps.
//
// Optional parameter. When 0 is specified, the API will automatically disabling pooling.
uint64_t MaxResourceSizeForPooling;

// Maximum video memory available to budget by the allocator, expressed as a
// percentage.
//
Expand Down Expand Up @@ -282,11 +273,6 @@ namespace gpgmm { namespace d3d12 {
HRESULT CreateResource(ComPtr<ID3D12Resource> committedResource,
ResourceAllocation** resourceAllocationOut);

// Return the residency manager. The lifetime of the residency manager is fully owned by the
// allocator. CreateResource enables the returned resource allocation to be residency
// managed when non-null.
ResidencyManager* GetResidencyManager() const;

// When pooling is enabled, the allocator will retain resource heaps in order to speed-up
// subsequent resource allocation requests. These resource allocations count against the
// app's memory usage and in general, will lead to increased memory usage by the overall
Expand Down