From e7b03bdba14f12b63e0aad7a3ea110d535327688 Mon Sep 17 00:00:00 2001 From: Bryan Bernhart Date: Tue, 12 Jul 2022 09:33:52 -0700 Subject: [PATCH] Remove isUMA from ResourceAllocator. Recongizing UMA is only needed for ResidencyManager. --- src/gpgmm/d3d12/JSONSerializerD3D12.cpp | 1 - src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp | 1 - src/gpgmm/d3d12/ResourceAllocatorD3D12.h | 1 - .../D3D12EventTraceReplay.cpp | 20 +++++++++---------- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/gpgmm/d3d12/JSONSerializerD3D12.cpp b/src/gpgmm/d3d12/JSONSerializerD3D12.cpp index dc2952e12..a654a797e 100644 --- a/src/gpgmm/d3d12/JSONSerializerD3D12.cpp +++ b/src/gpgmm/d3d12/JSONSerializerD3D12.cpp @@ -39,7 +39,6 @@ namespace gpgmm::d3d12 { JSONDict dict; dict.AddItem("Flags", desc.Flags); dict.AddItem("RecordOptions", Serialize(desc.RecordOptions)); - dict.AddItem("IsUMA", desc.IsUMA); dict.AddItem("ResourceHeapTier", desc.ResourceHeapTier); dict.AddItem("PreferredResourceHeapSize", desc.PreferredResourceHeapSize); dict.AddItem("MaxResourceHeapSize", desc.MaxResourceHeapSize); diff --git a/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp b/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp index ab0706bf7..751f92f1c 100644 --- a/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp +++ b/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp @@ -389,7 +389,6 @@ namespace gpgmm::d3d12 { : mDevice(std::move(descriptor.Device)), mResidencyManager(std::move(residencyManager)), mCaps(std::move(caps)), - mIsUMA(descriptor.IsUMA), mResourceHeapTier(descriptor.ResourceHeapTier), mIsAlwaysCommitted(descriptor.Flags & ALLOCATOR_FLAG_ALWAYS_COMMITED), mIsAlwaysInBudget(descriptor.Flags & ALLOCATOR_FLAG_ALWAYS_IN_BUDGET), diff --git a/src/gpgmm/d3d12/ResourceAllocatorD3D12.h b/src/gpgmm/d3d12/ResourceAllocatorD3D12.h index 1a44a3178..41f216430 100644 --- a/src/gpgmm/d3d12/ResourceAllocatorD3D12.h +++ b/src/gpgmm/d3d12/ResourceAllocatorD3D12.h @@ -581,7 +581,6 @@ namespace gpgmm::d3d12 { std::unique_ptr mCaps; - const bool mIsUMA; const D3D12_RESOURCE_HEAP_TIER mResourceHeapTier; const bool mIsAlwaysCommitted; const bool mIsAlwaysInBudget; diff --git a/src/tests/capture_replay_tests/D3D12EventTraceReplay.cpp b/src/tests/capture_replay_tests/D3D12EventTraceReplay.cpp index 3861b4291..1445010f5 100644 --- a/src/tests/capture_replay_tests/D3D12EventTraceReplay.cpp +++ b/src/tests/capture_replay_tests/D3D12EventTraceReplay.cpp @@ -324,6 +324,16 @@ class D3D12EventTraceReplay : public D3D12TestBase, public CaptureReplayTestWith residencyDesc.EvictBatchSize = snapshot["EvictBatchSize"].asUInt64(); residencyDesc.InitialFenceValue = snapshot["InitialFenceValue"].asUInt64(); + if (envParams.LogLevel <= gpgmm::LogSeverity::Warning && + residencyDesc.IsUMA != snapshot["IsUMA"].asBool() && + iterationIndex == 0) { + gpgmm::WarningLog() + << "Capture device does not match playback device (IsUMA: " + + std::to_string(snapshot["IsUMA"].asBool()) + " vs " + + std::to_string(residencyDesc.IsUMA) + ")."; + GPGMM_SKIP_TEST_IF(envParams.IsSameCapsRequired); + } + if (envParams.CaptureEventMask != 0) { residencyDesc.RecordOptions.Flags |= static_cast(envParams.CaptureEventMask); @@ -423,16 +433,6 @@ class D3D12EventTraceReplay : public D3D12TestBase, public CaptureReplayTestWith allocatorDesc.MinLogLevel = GetMessageSeverity(envParams.LogLevel); - if (envParams.LogLevel <= gpgmm::LogSeverity::Warning && - allocatorDesc.IsUMA != snapshot["IsUMA"].asBool() && - iterationIndex == 0) { - gpgmm::WarningLog() - << "Capture device does not match playback device (IsUMA: " + - std::to_string(snapshot["IsUMA"].asBool()) + " vs " + - std::to_string(allocatorDesc.IsUMA) + ")."; - GPGMM_SKIP_TEST_IF(envParams.IsSameCapsRequired); - } - if (envParams.LogLevel <= gpgmm::LogSeverity::Warning && allocatorDesc.ResourceHeapTier != snapshot["ResourceHeapTier"].asInt() &&