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
3 changes: 2 additions & 1 deletion src/gpgmm/d3d12/CapsD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ namespace gpgmm::d3d12 {
*createHeapNotResidencySupported = false;

// Only Windows 10 Build 20348 and later support creating non-resident heaps.
#ifdef D3D12_FEATURE_D3D12_OPTIONS7
// ID3D12Device8 is required to be defined in Windows 10 Build 20348 or newer builds.
#ifdef __ID3D12Device8_FWD_DEFINED__
D3D12_FEATURE_DATA_D3D12_OPTIONS7 options7 = {};
if (SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS7, &options7,
sizeof(options7)))) {
Expand Down
9 changes: 6 additions & 3 deletions src/gpgmm/d3d12/ResidencyManagerD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,9 +919,12 @@ namespace gpgmm::d3d12 {
gpgmm::DebugLog() << GetMemorySegmentName(segmentGroup, IsUMA()) << " GPU memory segment:";
gpgmm::DebugLog() << "\tBudget: " << GPGMM_BYTES_TO_MB(info->Budget) << " MBs ("
<< GPGMM_BYTES_TO_MB(info->CurrentUsage) << " used).";
gpgmm::DebugLog() << "\tReserved: " << GPGMM_BYTES_TO_MB(info->CurrentReservation)
<< " MBs (" << GPGMM_BYTES_TO_MB(info->AvailableForReservation)
<< " available).";

if (info->CurrentReservation == 0) {
gpgmm::DebugLog() << "\tReserved: " << GPGMM_BYTES_TO_MB(info->CurrentReservation)
<< " MBs (" << GPGMM_BYTES_TO_MB(info->AvailableForReservation)
<< " available).";
}
}

} // namespace gpgmm::d3d12
4 changes: 1 addition & 3 deletions src/gpgmm/d3d12/d3d12_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
// D3D12.h versions.
// Only once ALL builds upgrade to the newer D3D12.h version, can these defines be safely
// removed.
#ifndef D3D12_FEATURE_D3D12_OPTIONS7
# define D3D12_HEAP_FLAG_CREATE_NOT_RESIDENT static_cast<D3D12_HEAP_FLAGS>(0x800)
#endif
#define D3D12_HEAP_FLAG_CREATE_NOT_RESIDENT static_cast<D3D12_HEAP_FLAGS>(0x800)

using Microsoft::WRL::ComPtr;

Expand Down