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
6 changes: 3 additions & 3 deletions include/gpgmm_d3d12.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,13 @@ namespace gpgmm::d3d12 {
*/
RESIDENCY_FLAG_NONE = 0x0,

/** \brief Disables automatic background memory budget updates by OS notifications.
/** \brief Disables background memory budget updates from OS notifications.

By default, memory budget updates will be pushed by the OS using a background thread. If
the OS does not support push notifications or budget updates are not frequent enough, this
mechanism can be disabled where a pull-based method is used instead.
*/
RESIDENCY_FLAG_DISABLE_BUDGET_UPDATES_ON_WORKER_THREAD = 0x1,
RESIDENCY_FLAG_DISABLE_BACKGROUND_BUDGET_UPDATES = 0x1,

/** \brief Specifies if unified memory architecture (UMA) is always disabled.

Expand Down Expand Up @@ -1046,7 +1046,7 @@ namespace gpgmm::d3d12 {

/** \brief Prefetch memory for the next resource allocation.

The call to prefetch is deferred to a separate background thread by GPGMM which runs
The call to prefetch is deferred to a background thread by GPGMM which runs
when the current allocation requested is completed. By default, GPGMM will automatically
trigger prefetching based on heurstics. Prefetching enables more performance when
allocating for contiguous allocations or many resources of the same size.
Expand Down
2 changes: 1 addition & 1 deletion src/gpgmm/d3d12/ResidencyManagerD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace gpgmm::d3d12 {
new ResidencyManager(descriptor, pDevice, pAdapter, std::move(caps)));

// Require automatic video memory budget updates.
if (!(descriptor.Flags & RESIDENCY_FLAG_DISABLE_BUDGET_UPDATES_ON_WORKER_THREAD)) {
if (!(descriptor.Flags & RESIDENCY_FLAG_DISABLE_BACKGROUND_BUDGET_UPDATES)) {
GPGMM_RETURN_IF_FAILED(residencyManager->StartBudgetNotificationUpdates(), pDevice);
DebugLog(residencyManager.get(), MessageId::kBudgetUpdated)
<< "OS based memory budget updates were successfully enabled.";
Expand Down
4 changes: 2 additions & 2 deletions src/tests/end2end/D3D12ResidencyManagerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class D3D12ResidencyManagerTests : public D3D12TestBase, public ::testing::Test
RESIDENCY_MANAGER_DESC residencyDesc = D3D12TestBase::CreateBasicResidencyDesc();

// Disable automatic budget updates, since it occurs uncontrollably by the OS.
residencyDesc.Flags |= RESIDENCY_FLAG_DISABLE_BUDGET_UPDATES_ON_WORKER_THREAD;
residencyDesc.Flags |= RESIDENCY_FLAG_DISABLE_BACKGROUND_BUDGET_UPDATES;

// Specify a restricted budget, the OS budget fluctuates unpredicatbly.
residencyDesc.MaxBudgetInBytes = budget;
Expand Down Expand Up @@ -529,7 +529,7 @@ TEST_F(D3D12ResidencyManagerTests, OverBudget) {
TEST_F(D3D12ResidencyManagerTests, OverBudgetAsync) {
constexpr uint64_t kBudgetIsDeterminedByOS = 0;
RESIDENCY_MANAGER_DESC residencyDesc = CreateBasicResidencyDesc(kBudgetIsDeterminedByOS);
residencyDesc.Flags ^= RESIDENCY_FLAG_DISABLE_BUDGET_UPDATES_ON_WORKER_THREAD;
residencyDesc.Flags ^= RESIDENCY_FLAG_DISABLE_BACKGROUND_BUDGET_UPDATES;

ComPtr<IResidencyManager> residencyManager;
ASSERT_SUCCEEDED(
Expand Down