C Specification

To modify the priority of an existing memory allocation, call:

// Provided by VK_EXT_pageable_device_local_memory
void vkSetDeviceMemoryPriorityEXT(
    VkDevice                                    device,
    VkDeviceMemory                              memory,
    float                                       priority);

Parameters

  • device is the logical device that owns the memory.

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

  • 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.

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
  • VUID-vkSetDeviceMemoryPriorityEXT-priority-06258
    priority must be between 0 and 1, inclusive

Valid Usage (Implicit)
  • VUID-vkSetDeviceMemoryPriorityEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkSetDeviceMemoryPriorityEXT-memory-parameter
    memory must be a valid VkDeviceMemory handle

  • VUID-vkSetDeviceMemoryPriorityEXT-memory-parent
    memory must have been created, allocated, or retrieved from device

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0