diff --git a/.github/workflows/.patches/dawn.diff b/.github/workflows/.patches/dawn.diff index 17e94f731..be5cc050c 100644 --- a/.github/workflows/.patches/dawn.diff +++ b/.github/workflows/.patches/dawn.diff @@ -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; diff --git a/include/gpgmm_d3d12.h b/include/gpgmm_d3d12.h index 574b36f38..d30fcfd47 100644 --- a/include/gpgmm_d3d12.h +++ b/include/gpgmm_d3d12.h @@ -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. diff --git a/src/gpgmm/d3d12/ResidencyManagerD3D12.cpp b/src/gpgmm/d3d12/ResidencyManagerD3D12.cpp index 5c36f8033..98b5e2bdb 100644 --- a/src/gpgmm/d3d12/ResidencyManagerD3D12.cpp +++ b/src/gpgmm/d3d12/ResidencyManagerD3D12.cpp @@ -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."; } diff --git a/src/tests/end2end/D3D12ResidencyManagerTests.cpp b/src/tests/end2end/D3D12ResidencyManagerTests.cpp index 82b19f50f..36fb36f1b 100644 --- a/src/tests/end2end/D3D12ResidencyManagerTests.cpp +++ b/src/tests/end2end/D3D12ResidencyManagerTests.cpp @@ -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; @@ -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 residencyManager; ASSERT_SUCCEEDED(