From cc84962817ac4c5e4804fc4502486b4dd4d180f5 Mon Sep 17 00:00:00 2001 From: Bryan Bernhart Date: Fri, 13 May 2022 16:16:29 -0700 Subject: [PATCH 1/2] Fixup comment under MemoryAllocator::TrySubAllocateMemory. --- src/gpgmm/common/MemoryAllocator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gpgmm/common/MemoryAllocator.h b/src/gpgmm/common/MemoryAllocator.h index c1992f0e3..4133fda53 100644 --- a/src/gpgmm/common/MemoryAllocator.h +++ b/src/gpgmm/common/MemoryAllocator.h @@ -186,9 +186,9 @@ namespace gpgmm { ASSERT(memory != nullptr); memory->Ref(); - // Calling memory allocator must be responsible in fully initializing the memory - // allocation. This is because we do not yet know how to map the sub-allocated block to - // memory. + // Caller is be responsible in fully initializing the memory allocation. + // This is because TrySubAllocateMemory() does not necessarily know how to map the + // final sub-allocated block to created memory. return std::make_unique(nullptr, memory, kInvalidOffset, AllocationMethod::kUndefined, block); } From 8f2880f44e69b39ee5fcbe77bfe2b0f116b80225 Mon Sep 17 00:00:00 2001 From: Bryan Bernhart Date: Fri, 13 May 2022 16:23:13 -0700 Subject: [PATCH 2/2] Fix ASSERT in CreateBufferOversized. Reduces the log severity so the test fails expectedly on non-WARP devices. --- src/gpgmm/d3d12/ResourceHeapAllocatorD3D12.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpgmm/d3d12/ResourceHeapAllocatorD3D12.cpp b/src/gpgmm/d3d12/ResourceHeapAllocatorD3D12.cpp index 7c926f33c..f6f583c15 100644 --- a/src/gpgmm/d3d12/ResourceHeapAllocatorD3D12.cpp +++ b/src/gpgmm/d3d12/ResourceHeapAllocatorD3D12.cpp @@ -82,7 +82,7 @@ namespace gpgmm { namespace d3d12 { ComPtr heap; HRESULT hr = mDevice->CreateHeap(&heapDesc, IID_PPV_ARGS(&heap)); if (FAILED(hr)) { - ErrorEvent(GetTypename()) << " failed to create heap: " << GetErrorMessage(hr); + InfoEvent(GetTypename()) << " failed to create heap: " << GetErrorMessage(hr); return {}; }