C Specification

To register callbacks for underlying device memory events of type VkDeviceMemoryReportEventTypeEXT, add one or multiple VkDeviceDeviceMemoryReportCreateInfoEXT structures to the pNext chain of the VkDeviceCreateInfo structure.

// Provided by VK_EXT_device_memory_report
typedef struct VkDeviceDeviceMemoryReportCreateInfoEXT {
    VkStructureType                        sType;
    const void*                            pNext;
    VkDeviceMemoryReportFlagsEXT           flags;
    PFN_vkDeviceMemoryReportCallbackEXT    pfnUserCallback;
    void*                                  pUserData;
} VkDeviceDeviceMemoryReportCreateInfoEXT;

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • flags is 0 and reserved for future use.

  • pfnUserCallback is the application callback function to call.

  • pUserData is user data to be passed to the callback.

Description

The callback may be called from multiple threads simultaneously.

The callback must be called only once by the implementation when a VkDeviceMemoryReportEventTypeEXT event occurs.

Note

The callback could be called from a background thread other than the thread calling the Vulkan commands.

Valid Usage (Implicit)
  • VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-sType-sType
    sType must be VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT

  • VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-flags-zerobitmask
    flags must be 0

  • VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-pfnUserCallback-parameter
    pfnUserCallback must be a valid PFN_vkDeviceMemoryReportCallbackEXT value

  • VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-pUserData-parameter
    pUserData must be a pointer value

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