Detecting Video Memory Budget with Dynamic Video Memory Technology (DVMT)
Many graphic-intensive applications (especially games) require a minimum amount of video memory to run correctly, or to run at all. Dynamic Video Memory Technology* (DVMT*) is a method that dynamically allocates system memory for use as graphics memory. DVMT balances 2D and/or 3D graphics and system performance. Graphics memory allocates based on system requirements and application demands (up to the configured maximum amount). When an application no longer needs memory, the dynamically allocated portion returns to the operating system for other uses.
Intel recommends that developers use the following methods to detect the video memory budget that’s available to your application.
For Windows® 10, use the QueryVideoMemoryInfo() approach.
- We recommend applications detect the video memory budget using a query to the QueryVideoMemoryInfo() method. This is the most accurate method and also gives the operating system the chance to limit this to what you’re actually budgeted for: 2 GB for all 4thgeneration and earlier Intel® Core™ processors, and roughly 90 percent of total memory divided by two for 5th generation and later Intel® Core™ processors.
For pre-Windows 10, use the DXGI_ADAPTER_DESC approach:
- We recommend adding the DedicatedVideoMemory to the SharedSystemMemory (50 percent of the total memory) within the DXGI_ADAPTER_DESC structure. On discrete graphics cards, DedicatedVideoMemory is the amount of onboard video RAM (VRAM). For Intel integrated graphics processing units (GPUs), this represents 128 MB DVMT pre-allocation set in BIOS. Consult other vendors for how they handle this.
The QueryVideoMemoryInfo() approach explicitly defines the Budget value as a UINT64 in the DXGI_QUERY_VIDEO_MEMORY_INFO structure. With the DXGI_ADAPTER_DESC approach, Microsoft* stores the system memory information as a SIZE_T (defined under the hood as an unsigned long) in the DXGI_ADAPTER_DESC structure. This can be problematic. Depending on how the compiler treats UINT64 and SIZE_T, and whether your app is 32 bit or 64 bit, the difference between what the video memory budget appears to be and what it actually is could be a margin upwards of 50 percent to 90 percent.
For more such intel IoT resources and tools from Intel, please visit the Intel® Developer Zone
Source:https://software.intel.com/en-us/blogs/2017/10/18/detecting-video-memory-budget-with-dynamic-video-memory-technology-dvmt