blob: ceea77bcd4da6c34633303881a6ddb25dcb345a3 [file] [log] [blame]
// Copyright 2018-2021 The Khronos Group, Inc.
//
// SPDX-License-Identifier: CC-BY-4.0
include::{generated}/meta/{refprefix}VK_EXT_memory_budget.txt[]
=== Other Extension Metadata
*Last Modified Date*::
2018-10-08
*Contributors*::
- Jeff Bolz, NVIDIA
- Jeff Juliano, NVIDIA
=== Description
While running a Vulkan application, other processes on the machine might
also be attempting to use the same device memory, which can pose problems.
This extension adds support for querying the amount of memory used and the
total memory budget for a memory heap.
The values returned by this query are implementation-dependent and can
depend on a variety of factors including operating system and system load.
The slink:VkPhysicalDeviceMemoryBudgetPropertiesEXT::pname:heapBudget values
can be used as a guideline for how much total memory from each heap the
**current process** can use at any given time, before allocations may start
failing or causing performance degradation.
The values may change based on other activity in the system that is outside
the scope and control of the Vulkan implementation.
The slink:VkPhysicalDeviceMemoryBudgetPropertiesEXT::pname:heapUsage will
display the **current process** estimated heap usage.
With this information, the idea is for an application at some interval (once
per frame, per few seconds, etc) to query pname:heapBudget and
pname:heapUsage.
From here the application can notice if it is over budget and decide how it
wants to handle the memory situation (free it, move to host memory, changing
mipmap levels, etc).
This extension is designed to be used in concert with
`apiext:VK_EXT_memory_priority` to help with this part of memory management.
include::{generated}/interfaces/VK_EXT_memory_budget.txt[]
=== Version History
* Revision 1, 2018-10-08 (Jeff Bolz)
- Initial revision