Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions include/gpgmm_d3d12.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ResourceAllocation*>(allocation.Get()));
}
Expand Down Expand Up @@ -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)
Expand All @@ -1413,7 +1413,7 @@ namespace gpgmm::d3d12 {
ComPtr<IHeap> 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,
Expand Down