vulkan-3.11.3: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_memory_budget

Description

Name

VK_EXT_memory_budget - device extension

VK_EXT_memory_budget

Name String
VK_EXT_memory_budget
Extension Type
Device extension
Registered Extension Number
238
Revision
1
Extension and Version Dependencies
  • Requires Vulkan 1.0
  • Requires VK_KHR_get_physical_device_properties2
Contact

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 PhysicalDeviceMemoryBudgetPropertiesEXT::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 PhysicalDeviceMemoryBudgetPropertiesEXT::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 heapBudget and 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 VK_EXT_memory_priority to help with this part of memory management.

New Structures

New Enum Constants

Version History

  • Revision 1, 2018-10-08 (Jeff Bolz)

    • Initial revision

See Also

PhysicalDeviceMemoryBudgetPropertiesEXT

Document Notes

For more information, see the Vulkan Specification

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Synopsis

Documentation

data PhysicalDeviceMemoryBudgetPropertiesEXT Source #

VkPhysicalDeviceMemoryBudgetPropertiesEXT - Structure specifying physical device memory budget and usage

Description

The values returned in this structure are not invariant. The heapBudget and heapUsage values must be zero for array elements greater than or equal to PhysicalDeviceMemoryProperties::memoryHeapCount. The heapBudget value must be non-zero for array elements less than PhysicalDeviceMemoryProperties::memoryHeapCount. The heapBudget value must be less than or equal to MemoryHeap::size for each heap.

Valid Usage (Implicit)

See Also

DeviceSize, StructureType

Constructors

PhysicalDeviceMemoryBudgetPropertiesEXT 

Fields

  • heapBudget :: Vector DeviceSize

    heapBudget is an array of MAX_MEMORY_HEAPS DeviceSize values in which memory budgets are returned, with one element for each memory heap. A heap’s budget is a rough estimate of how much memory the process can allocate from that heap before allocations may fail or cause performance degradation. The budget includes any currently allocated device memory.

  • heapUsage :: Vector DeviceSize

    heapUsage is an array of MAX_MEMORY_HEAPS DeviceSize values in which memory usages are returned, with one element for each memory heap. A heap’s usage is an estimate of how much memory the process is currently using in that heap.

Instances

Instances details
Show PhysicalDeviceMemoryBudgetPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_budget

Storable PhysicalDeviceMemoryBudgetPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_budget

FromCStruct PhysicalDeviceMemoryBudgetPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_budget

ToCStruct PhysicalDeviceMemoryBudgetPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_budget

Zero PhysicalDeviceMemoryBudgetPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_budget

pattern EXT_MEMORY_BUDGET_SPEC_VERSION :: forall a. Integral a => a Source #

type EXT_MEMORY_BUDGET_EXTENSION_NAME = "VK_EXT_memory_budget" Source #

pattern EXT_MEMORY_BUDGET_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #