How can I get the physical specs (memory size, etc.) of a GPU in D3D12? (This would be useful to activate/deactivate some features for specific GPU specs)
Asked
Active
Viewed 315 times
0
-
Have you tried [IDXGIAdapter::GetDesc()](https://learn.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-idxgiadapter-getdesc?redirectedfrom=MSDN)? – FoggyDay Jan 29 '20 at 06:58
2 Answers
0
With DirectX 12, you do this through the IDXGIAdapter3::QueryVideoMemoryInfo
.
See Microsoft Docs
As with most things in DirectX 12, memory management and dealing with VRAM over-commit is left as something the application has to explicitly deal with. Unlike with DirectX 11, it won't degrade gracefully by default. You should take a look at the Residency library sample on GitHub.

Chuck Walbourn
- 38,259
- 2
- 58
- 81
0
An alternative to DXGI is to use DXCore, specifically IDXCoreAdapter::QueryState
with DXCoreAdapterState::AdapterMemoryBudget
. This will give you access to:
struct DXCoreAdapterMemoryBudget {
uint64_t budget;
uint64_t currentUsage;
uint64_t availableForReservation;
uint64_t currentReservation;
};

Mark Ingram
- 71,849
- 51
- 176
- 230