C Specification

Data structures for objects are reserved by the implementation at device creation time. The application must provide upper bounds on numbers of objects and other limits at device creation time. To reserve data structures for use by objects created from this device, add a VkDeviceObjectReservationCreateInfo structure to the pNext chain of the VkDeviceCreateInfo structure.

// Provided by VKSC_VERSION_1_0
typedef struct VkDeviceObjectReservationCreateInfo {
    VkStructureType                     sType;
    const void*                         pNext;
    uint32_t                            pipelineCacheCreateInfoCount;
    const VkPipelineCacheCreateInfo*    pPipelineCacheCreateInfos;
    uint32_t                            pipelinePoolSizeCount;
    const VkPipelinePoolSize*           pPipelinePoolSizes;
    uint32_t                            semaphoreRequestCount;
    uint32_t                            commandBufferRequestCount;
    uint32_t                            fenceRequestCount;
    uint32_t                            deviceMemoryRequestCount;
    uint32_t                            bufferRequestCount;
    uint32_t                            imageRequestCount;
    uint32_t                            eventRequestCount;
    uint32_t                            queryPoolRequestCount;
    uint32_t                            bufferViewRequestCount;
    uint32_t                            imageViewRequestCount;
    uint32_t                            layeredImageViewRequestCount;
    uint32_t                            pipelineCacheRequestCount;
    uint32_t                            pipelineLayoutRequestCount;
    uint32_t                            renderPassRequestCount;
    uint32_t                            graphicsPipelineRequestCount;
    uint32_t                            computePipelineRequestCount;
    uint32_t                            descriptorSetLayoutRequestCount;
    uint32_t                            samplerRequestCount;
    uint32_t                            descriptorPoolRequestCount;
    uint32_t                            descriptorSetRequestCount;
    uint32_t                            framebufferRequestCount;
    uint32_t                            commandPoolRequestCount;
    uint32_t                            samplerYcbcrConversionRequestCount;
    uint32_t                            surfaceRequestCount;
    uint32_t                            swapchainRequestCount;
    uint32_t                            displayModeRequestCount;
    uint32_t                            subpassDescriptionRequestCount;
    uint32_t                            attachmentDescriptionRequestCount;
    uint32_t                            descriptorSetLayoutBindingRequestCount;
    uint32_t                            descriptorSetLayoutBindingLimit;
    uint32_t                            maxImageViewMipLevels;
    uint32_t                            maxImageViewArrayLayers;
    uint32_t                            maxLayeredImageViewMipLevels;
    uint32_t                            maxOcclusionQueriesPerPool;
    uint32_t                            maxPipelineStatisticsQueriesPerPool;
    uint32_t                            maxTimestampQueriesPerPool;
    uint32_t                            maxImmutableSamplersPerDescriptorSetLayout;
} VkDeviceObjectReservationCreateInfo;

Members

  • sType is a VkStructureType value identifying this structure.

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

  • pipelineCacheCreateInfoCount is the length of the pPipelineCacheCreateInfos array.

  • pPipelineCacheCreateInfos is a pointer to an array of VkPipelineCacheCreateInfo structures that contain the creation information of the pipeline caches that can be created on this device.

  • pipelinePoolSizeCount is the length of the pPipelinePoolSizes array.

  • pPipelinePoolSizes is a pointer to an array of VkPipelinePoolSize structures requesting memory be reserved for pipelines of the specified sizes.

  • semaphoreRequestCount is the requested maximum number of VkSemaphore objects that can exist at the same time.

  • commandBufferRequestCount is the requested maximum number of VkCommandBuffer objects that can be reserved by all VkCommandPool objects.

  • fenceRequestCount is the requested maximum number of VkFence objects that can exist at the same time.

  • deviceMemoryRequestCount is the requested maximum number of VkDeviceMemory objects that can exist at the same time.

  • bufferRequestCount is the requested maximum number of VkBuffer objects that can exist at the same time.

  • imageRequestCount is the requested maximum number of VkImage objects that can exist at the same time.

  • eventRequestCount is the requested maximum number of VkEvent objects that can exist at the same time.

  • queryPoolRequestCount is the requested maximum number of VkQueryPool objects that can exist at the same time.

  • bufferViewRequestCount is the requested maximum number of VkBufferView objects that can exist at the same time.

  • imageViewRequestCount is the requested maximum number of VkImageView objects that can exist at the same time.

  • layeredImageViewRequestCount is the requested maximum number VkImageView objects created with VkImageViewCreateInfo::subresourceRange.layerCount greater than 1 that can exist at the same time.

  • pipelineCacheRequestCount is the requested maximum number of VkPipelineCache objects that can exist at the same time.

  • pipelineLayoutRequestCount is the requested maximum number of VkPipelineLayout objects that can exist at the same time.

  • renderPassRequestCount is the requested maximum number of VkRenderPass objects that can exist at the same time.

  • graphicsPipelineRequestCount is the requested maximum number of graphics VkPipeline objects that can exist at the same time.

  • computePipelineRequestCount is the requested maximum number of compute VkPipeline objects that can exist at the same time.

  • descriptorSetLayoutRequestCount is the requested maximum number of VkDescriptorSetLayout objects that can exist at the same time.

  • samplerRequestCount is the requested maximum number of VkSampler objects that can exist at the same time.

  • descriptorPoolRequestCount is the requested maximum number of VkDescriptorPool objects that can exist at the same time.

  • descriptorSetRequestCount is the requested maximum number of VkDescriptorSet objects that can exist at the same time.

  • framebufferRequestCount is the requested maximum number of VkFramebuffer objects that can exist at the same time.

  • commandPoolRequestCount is the requested maximum number of VkCommandPool objects that can exist at the same time.

  • samplerYcbcrConversionRequestCount is the requested maximum number of VkSamplerYcbcrConversion objects that can exist at the same time.

  • surfaceRequestCount is deprecated and implementations must ignore it.

  • swapchainRequestCount is the requested maximum number of VkSwapchainKHR objects that can exist at the same time.

  • displayModeRequestCount is deprecated and implementations must ignore it.

  • subpassDescriptionRequestCount is the requested maximum sum of all VkRenderPassCreateInfo2::subpassCount values across all VkRenderPass objects that can exist at the same time.

  • attachmentDescriptionRequestCount is the requested maximum sum of all VkRenderPassCreateInfo2::attachmentCount values across all VkRenderPass objects that can exist at the same time.

  • descriptorSetLayoutBindingRequestCount is the requested maximum sum of all VkDescriptorSetLayoutCreateInfo::bindingCount values across all VkDescriptorSetLayout objects that can exist at the same time.

  • descriptorSetLayoutBindingLimit is one greater than the maximum value of VkDescriptorSetLayoutBinding::binding that can be used.

  • maxImageViewMipLevels is the maximum value of VkImageViewCreateInfo::subresourceRange.levelCount that can be used.

  • maxImageViewArrayLayers is the maximum value of VkImageViewCreateInfo::subresourceRange.layerCount that can be used.

  • maxLayeredImageViewMipLevels is the maximum value of VkImageViewCreateInfo::subresourceRange.levelCount that can be used when VkImageViewCreateInfo::subresourceRange.layerCount is greater than 1.

  • maxOcclusionQueriesPerPool is the requested maximum number of VK_QUERY_TYPE_OCCLUSION queries that can exist at the same time in a single query pool.

  • maxPipelineStatisticsQueriesPerPool is the requested maximum number of VK_QUERY_TYPE_PIPELINE_STATISTICS queries that can exist at the same time in a single query pool.

  • maxTimestampQueriesPerPool is the requested maximum number of VK_QUERY_TYPE_TIMESTAMP queries that can exist at the same time in a single query pool.

  • maxImmutableSamplersPerDescriptorSetLayout is the requested maximum number of immutable samplers that can be used across all bindings in a descriptor set layout.

Description

Multiple VkDeviceObjectReservationCreateInfo structures can be chained together. The maximum value from all instances of maxImageViewMipLevels, maxImageViewArrayLayers, maxLayeredImageViewMipLevels, descriptorSetLayoutBindingLimit, maxOcclusionQueriesPerPool, maxPipelineStatisticsQueriesPerPool, maxTimestampQueriesPerPool, and maxImmutableSamplersPerDescriptorSetLayout will be reserved. For the remaining members, the sum of the requested resources from all instances of VkDeviceObjectReservationCreateInfo will be reserved.

If VkPhysicalDeviceVulkanSC10Properties::deviceDestroyFreesMemory is VK_TRUE, the reserved memory is returned to the system when the device is destroyed, otherwise it may not be returned to the system until the process is terminated.

Valid Usage
  • VUID-VkDeviceObjectReservationCreateInfo-maxImageViewArrayLayers-05014
    maxImageViewArrayLayers must be less than or equal to VkPhysicalDeviceLimits::maxImageArrayLayers

  • VUID-VkDeviceObjectReservationCreateInfo-maxImageViewMipLevels-05015
    maxImageViewMipLevels must be less than or equal to the number of levels in the complete mipmap chain based on the maximum of VkPhysicalDeviceLimits::maxImageDimension1D, maxImageDimension2D, maxImageDimension3D, and maxImageDimensionCube

  • VUID-VkDeviceObjectReservationCreateInfo-maxLayeredImageViewMipLevels-05016
    maxLayeredImageViewMipLevels must be less than or equal to the number of levels in the complete mipmap chain based on VkPhysicalDeviceLimits::maxImageDimension1D, maxImageDimension2D, maxImageDimension3D, and maxImageDimensionCube

  • VUID-VkDeviceObjectReservationCreateInfo-subpassDescriptionRequestCount-05017
    subpassDescriptionRequestCount must be less than or equal to renderPassRequestCount multiplied by VkPhysicalDeviceVulkanSC10Properties::maxRenderPassSubpasses

  • VUID-VkDeviceObjectReservationCreateInfo-attachmentDescriptionRequestCount-05018
    attachmentDescriptionRequestCount must be less than or equal to renderPassRequestCount multiplied by VkPhysicalDeviceVulkanSC10Properties::maxFramebufferAttachments

Valid Usage (Implicit)
  • VUID-VkDeviceObjectReservationCreateInfo-sType-sType
    sType must be VK_STRUCTURE_TYPE_DEVICE_OBJECT_RESERVATION_CREATE_INFO

  • VUID-VkDeviceObjectReservationCreateInfo-pPipelineCacheCreateInfos-parameter
    If pipelineCacheCreateInfoCount is not 0, pPipelineCacheCreateInfos must be a valid pointer to an array of pipelineCacheCreateInfoCount valid VkPipelineCacheCreateInfo structures

  • VUID-VkDeviceObjectReservationCreateInfo-pPipelinePoolSizes-parameter
    If pipelinePoolSizeCount is not 0, pPipelinePoolSizes must be a valid pointer to an array of pipelinePoolSizeCount valid VkPipelinePoolSize structures

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-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0