vulkan-3.26.1: Bindings to the Vulkan graphics API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_pageable_device_local_memory

Description

Name

VK_EXT_pageable_device_local_memory - device extension

VK_EXT_pageable_device_local_memory

Name String
VK_EXT_pageable_device_local_memory
Extension Type
Device extension
Registered Extension Number
413
Revision
1
Ratification Status
Not ratified
Extension and Version Dependencies
VK_EXT_memory_priority
Contact

Other Extension Metadata

Last Modified Date
2021-08-24
Contributors
  • Hans-Kristian Arntzen, Valve
  • Axel Gneiting, id Software
  • Billy Khan, id Software
  • Daniel Koch, NVIDIA
  • Chris Lentini, NVIDIA
  • Joshua Schnarr, NVIDIA
  • Stu Smith, AMD

Description

Vulkan is frequently implemented on multi-user and multi-process operating systems where the device-local memory can be shared by more than one process. On such systems the size of the device-local memory available to the application may not be the full size of the memory heap at all times. In order for these operating systems to support multiple applications the device-local memory is virtualized and paging is used to move memory between device-local and host-local memory heaps, transparent to the application.

The current Vulkan specification does not expose this behavior well and may cause applications to make suboptimal memory choices when allocating memory. For example, in a system with multiple applications running, the application may think that device-local memory is full and revert to making performance-sensitive allocations from host-local memory. In reality the memory heap might not have been full, it just appeared to be at the time memory consumption was queried, and a device-local allocation would have succeeded. A well designed operating system that implements pageable device-local memory will try to have all memory allocations for the foreground application paged into device-local memory, and paged out for other applications as needed when not in use.

When this extension is exposed by the Vulkan implementation it indicates to the application that the operating system implements pageable device-local memory and the application should adjust its memory allocation strategy accordingly. The extension also exposes a new setDeviceMemoryPriorityEXT function to allow the application to dynamically adjust the priority of existing memory allocations based on its current needs. This will help the operating system page out lower priority memory allocations before higher priority allocations when needed. It will also help the operating system decide which memory allocations to page back into device-local memory first.

To take best advantage of pageable device-local memory the application must create the Vulkan device with the PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT::pageableDeviceLocalMemory feature enabled. When enabled the Vulkan implementation will allow device-local memory allocations to be paged in and out by the operating system, and may not return VK_ERROR_OUT_OF_DEVICE_MEMORY even if device-local memory appears to be full, but will instead page this, or other allocations, out to make room. The Vulkan implementation will also ensure that host-local memory allocations will never be promoted to device-local memory by the operating system, or consume device-local memory.

New Commands

New Structures

New Enum Constants

Version History

  • Revision 1, 2021-08-24 (Piers Daniell)

    • Initial revision

See Also

PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT, setDeviceMemoryPriorityEXT

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

setDeviceMemoryPriorityEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that owns the memory.

device must be a valid Device handle

-> DeviceMemory

memory is the DeviceMemory object to which the new priority will be applied.

memory must be a valid DeviceMemory handle

memory must have been created, allocated, or retrieved from device

-> ("priority" ::: Float)

priority is a floating-point value between 0 and 1, indicating the priority of the allocation relative to other memory allocations. Larger values are higher priority. The granularity of the priorities is implementation-dependent.

priority must be between 0 and 1, inclusive

-> io () 

vkSetDeviceMemoryPriorityEXT - Change a memory allocation priority

Description

Memory allocations with higher priority may be more likely to stay in device-local memory when the system is under memory pressure.

Valid Usage (Implicit)

See Also

VK_EXT_pageable_device_local_memory, Device, DeviceMemory

data PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT Source #

VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT - Structure describing whether the implementation supports pageable device-local memory

Members

This structure describes the following feature:

Description

If the PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_EXT_pageable_device_local_memory, Bool32, StructureType

Constructors

PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT 

Fields

  • pageableDeviceLocalMemory :: Bool

    pageableDeviceLocalMemory indicates that the implementation supports pageable device-local memory and may transparently move device-local memory allocations to host-local memory to better share device-local memory with other applications.

Instances

Instances details
Storable PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pageable_device_local_memory

Show PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pageable_device_local_memory

Eq PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pageable_device_local_memory

FromCStruct PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pageable_device_local_memory

ToCStruct PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pageable_device_local_memory

Zero PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_pageable_device_local_memory

type EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME = "VK_EXT_pageable_device_local_memory" Source #