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: 3 additions & 2 deletions include/gpgmm_d3d12.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,14 +410,15 @@ namespace gpgmm::d3d12 {
*/
RESIDENCY_MANAGER_FLAG_ALLOW_BACKGROUND_BUDGET_UPDATES = 0x1,

/** \brief Specifies if unified memory architecture (UMA) is always disabled.
/** \brief Specifies if unified memory architecture (UMA) is always disabled, even
if the adapter supports UMA.

By default, UMA is enabled when the adapter supports the architecture.
UMA allows the residency manager to budget using a single memory segment.
Otherwise, the residency manager will have two budgets for local and non-local
memory segments, respectively.
*/
RESIDENCY_MANAGER_FLAG_DISABLE_UNIFIED_MEMORY = 0x2,
RESIDENCY_MANAGER_FLAG_NEVER_USE_UNIFIED_MEMORY = 0x2,

/** \brief Requires heaps to be in budget or E_OUTOFMEMORY.

Expand Down
6 changes: 3 additions & 3 deletions src/gpgmm/d3d12/ResidencyManagerD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ namespace gpgmm::d3d12 {
caps.reset(ptr);
}

if ((descriptor.Flags & RESIDENCY_MANAGER_FLAG_DISABLE_UNIFIED_MEMORY) &&
if ((descriptor.Flags & RESIDENCY_MANAGER_FLAG_NEVER_USE_UNIFIED_MEMORY) &&
caps->IsAdapterUMA()) {
WarnLog(MessageId::kInvalidArgument, true)
<< "RESIDENCY_MANAGER_FLAG_DISABLE_UNIFIED_MEMORY flag was specified but "
<< "RESIDENCY_MANAGER_FLAG_NEVER_USE_UNIFIED_MEMORY flag was specified but "
"did not match the architecture of the adapter.";
}

Expand Down Expand Up @@ -171,7 +171,7 @@ namespace gpgmm::d3d12 {
mEvictSizeInBytes(descriptor.EvictSizeInBytes == 0 ? kDefaultEvictSizeInBytes
: descriptor.EvictSizeInBytes),
mIsUMA(caps->IsAdapterUMA() &&
!(descriptor.Flags & RESIDENCY_MANAGER_FLAG_DISABLE_UNIFIED_MEMORY)),
!(descriptor.Flags & RESIDENCY_MANAGER_FLAG_NEVER_USE_UNIFIED_MEMORY)),
mFlushEventBuffersOnDestruct(descriptor.RecordOptions.EventScope &
RECORD_SCOPE_PER_INSTANCE),
mInitialFenceValue(descriptor.InitialFenceValue),
Expand Down