diff --git a/include/gpgmm_d3d12.h b/include/gpgmm_d3d12.h index d9bf3a2bf..16e94fd27 100644 --- a/include/gpgmm_d3d12.h +++ b/include/gpgmm_d3d12.h @@ -1084,7 +1084,7 @@ namespace gpgmm::d3d12 { Mostly used when external resources are residency managed elsewhere. */ - ALLOCATION_FLAG_DISABLE_RESIDENCY = 0x80, + ALLOCATION_FLAG_NEVER_RESIDENT = 0x80, /** \brief Report alignment mismatches upon successful resource creation. @@ -1094,7 +1094,7 @@ namespace gpgmm::d3d12 { Must compile with GPGMM_ENABLE_MEMORY_ALIGN_CHECKS to use as the request size is normally not tracked. */ - ALLOCATION_FLAG_WARN_ON_ALIGNMENT_MISMATCH = 0x100, + ALLOCATION_FLAG_ALWAYS_WARN_ON_ALIGNMENT_MISMATCH = 0x100, }; DEFINE_ENUM_FLAG_OPERATORS(ALLOCATION_FLAGS) diff --git a/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp b/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp index 4f71cfafe..4ad56f981 100644 --- a/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp +++ b/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp @@ -964,7 +964,7 @@ namespace gpgmm::d3d12 { GPGMM_RETURN_IF_FAILED(QueryStatsInternal(nullptr)); } - if (allocationDescriptor.Flags & ALLOCATION_FLAG_WARN_ON_ALIGNMENT_MISMATCH) { + if (allocationDescriptor.Flags & ALLOCATION_FLAG_ALWAYS_WARN_ON_ALIGNMENT_MISMATCH) { CheckAndReportAllocationMisalignment( *static_cast(allocation.Get())); } @@ -1391,7 +1391,7 @@ namespace gpgmm::d3d12 { } const ALLOCATION_FLAGS allowMask = - (ALLOCATION_FLAG_DISABLE_RESIDENCY & ALLOCATION_FLAG_ALWAYS_ATTRIBUTE_HEAPS & + (ALLOCATION_FLAG_NEVER_RESIDENT & ALLOCATION_FLAG_ALWAYS_ATTRIBUTE_HEAPS & ALLOCATION_FLAG_NEVER_ALLOCATE_MEMORY); if (allocationDescriptor.Flags & ~allowMask) { ErrorLog(MessageId::kInvalidArgument) @@ -1413,7 +1413,7 @@ namespace gpgmm::d3d12 { ComPtr resourceHeap; GPGMM_RETURN_IF_FAILED_ON_DEVICE( Heap::CreateHeap(resourceHeapDesc, - (allocationDescriptor.Flags & ALLOCATION_FLAG_DISABLE_RESIDENCY) + (allocationDescriptor.Flags & ALLOCATION_FLAG_NEVER_RESIDENT) ? nullptr : mResidencyManager.Get(), ImportResourceCallbackContext::GetHeap, &importResourceCallbackContext,