• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2018-2024 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5include::{generated}/meta/{refprefix}VK_EXT_memory_budget.adoc[]
6
7=== Other Extension Metadata
8
9*Last Modified Date*::
10    2018-10-08
11*Contributors*::
12  - Jeff Bolz, NVIDIA
13  - Jeff Juliano, NVIDIA
14
15=== Description
16
17While running a Vulkan application, other processes on the machine might
18also be attempting to use the same device memory, which can pose problems.
19This extension adds support for querying the amount of memory used and the
20total memory budget for a memory heap.
21The values returned by this query are implementation-dependent and can
22depend on a variety of factors including operating system and system load.
23
24The slink:VkPhysicalDeviceMemoryBudgetPropertiesEXT::pname:heapBudget values
25can be used as a guideline for how much total memory from each heap the
26**current process** can use at any given time, before allocations may start
27failing or causing performance degradation.
28The values may change based on other activity in the system that is outside
29the scope and control of the Vulkan implementation.
30
31The slink:VkPhysicalDeviceMemoryBudgetPropertiesEXT::pname:heapUsage will
32display the **current process** estimated heap usage.
33
34With this information, the idea is for an application at some interval (once
35per frame, per few seconds, etc) to query pname:heapBudget and
36pname:heapUsage.
37From here the application can notice if it is over budget and decide how it
38wants to handle the memory situation (free it, move to host memory, changing
39mipmap levels, etc).
40This extension is designed to be used in concert with
41`apiext:VK_EXT_memory_priority` to help with this part of memory management.
42
43include::{generated}/interfaces/VK_EXT_memory_budget.adoc[]
44
45=== Version History
46
47  * Revision 1, 2018-10-08 (Jeff Bolz)
48  ** Initial revision
49