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
2 changes: 1 addition & 1 deletion .github/workflows/.patches/dawn.diff
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ index 214fa67f8..d909d4d2a 100644
+ // residencyDesc.IsUMA = adapter->GetDeviceInfo().isUMA;
+
+ if (IsToggleEnabled(Toggle::UseD3D12SmallResidencyBudgetForTesting)) {
+ residencyDesc.Flags |= gpgmm::d3d12::RESIDENCY_FLAG_NEVER_UPDATE_BUDGET_ON_WORKER_THREAD;
+ residencyDesc.Flags |= gpgmm::d3d12::RESIDENCY_FLAG_DISABLE_BUDGET_UPDATES_ON_WORKER_THREAD;
+ residencyDesc.MaxBudgetInBytes = 100ll * 1024ll * 1024ll; // 100MB
+ allocatorDesc.Flags |= gpgmm::d3d12::ALLOCATOR_FLAG_DISABLE_MEMORY_PREFETCH;
+ allocatorDesc.Flags |= gpgmm::d3d12::ALLOCATOR_FLAG_ALWAYS_IN_BUDGET;
Expand Down
2 changes: 1 addition & 1 deletion include/gpgmm_d3d12.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ namespace gpgmm::d3d12 {
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_NEVER_UPDATE_BUDGET_ON_WORKER_THREAD = 0x1,
RESIDENCY_FLAG_DISABLE_BUDGET_UPDATES_ON_WORKER_THREAD = 0x1,

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

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 @@ -209,7 +209,7 @@ namespace gpgmm::d3d12 {
new ResidencyManager(descriptor, pDevice, pAdapter, std::move(caps)));

// Require automatic video memory budget updates.
if (!(descriptor.Flags & RESIDENCY_FLAG_NEVER_UPDATE_BUDGET_ON_WORKER_THREAD)) {
if (!(descriptor.Flags & RESIDENCY_FLAG_DISABLE_BUDGET_UPDATES_ON_WORKER_THREAD)) {
ReturnIfFailed(residencyManager->StartBudgetNotificationUpdates());
gpgmm::DebugLog() << "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_DESC residencyDesc = D3D12TestBase::CreateBasicResidencyDesc();

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

// 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_DESC residencyDesc = CreateBasicResidencyDesc(kBudgetIsDeterminedByOS);
residencyDesc.Flags ^= RESIDENCY_FLAG_NEVER_UPDATE_BUDGET_ON_WORKER_THREAD;
residencyDesc.Flags ^= RESIDENCY_FLAG_DISABLE_BUDGET_UPDATES_ON_WORKER_THREAD;

ComPtr<IResidencyManager> residencyManager;
ASSERT_SUCCEEDED(
Expand Down