Skip to content
Merged
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: 6 additions & 0 deletions src/gpgmm/d3d12/ResourceHeapAllocatorD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ namespace gpgmm { namespace d3d12 {
// |alignment| to avoid wasting bytes.
// https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_HEAP_INFO
const uint64_t heapSize = AlignTo(size, alignment);
if (heapSize > size) {
DebugEvent("ResourceHeapAllocator.TryAllocateMemory",
ALLOCATOR_MESSAGE_ID_ALIGNMENT_MISMATCH)
<< "Resource heap size is larger then the requested size (" +
std::to_string(heapSize) + " vs " + std::to_string(size) + " bytes).";
}

const DXGI_MEMORY_SEGMENT_GROUP memorySegmentGroup =
GetPreferredMemorySegmentGroup(mDevice, mIsUMA, mHeapType);
Expand Down