Class VkMemoryDedicatedRequirements

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
    Direct Known Subclasses:
    VkMemoryDedicatedRequirementsKHR

    public class VkMemoryDedicatedRequirements
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure describing dedicated allocation requirements of buffer and image resources.
    Description

    When the implementation sets requiresDedicatedAllocation to TRUE, it must also set prefersDedicatedAllocation to TRUE.

    If the VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed as the pMemoryRequirements parameter of a vkGetBufferMemoryRequirements2 call, requiresDedicatedAllocation may be TRUE under one of the following conditions:

    In all other cases, requiresDedicatedAllocation must be set to FALSE by the implementation whenever a VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed to a call to vkGetBufferMemoryRequirements2.

    If the VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed as the pMemoryRequirements parameter of a vkGetBufferMemoryRequirements2 call and BUFFER_CREATE_SPARSE_BINDING_BIT was set in VkBufferCreateInfo::flags when buffer was created then the implementation must set both prefersDedicatedAllocation and requiresDedicatedAllocation to FALSE.

    If the VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed as the pMemoryRequirements parameter of a vkGetImageMemoryRequirements2 call, requiresDedicatedAllocation may be TRUE under one of the following conditions:

    In all other cases, requiresDedicatedAllocation must be set to FALSE by the implementation whenever a VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed to a call to vkGetImageMemoryRequirements2.

    If the VkMemoryDedicatedRequirements structure is included in the pNext chain of the VkMemoryRequirements2 structure passed as the pMemoryRequirements parameter of a vkGetImageMemoryRequirements2 call and IMAGE_CREATE_SPARSE_BINDING_BIT was set in VkImageCreateInfo::flags when image was created then the implementation must set both prefersDedicatedAllocation and requiresDedicatedAllocation to FALSE.

    Valid Usage (Implicit)

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • prefersDedicatedAllocation – specifies that the implementation would prefer a dedicated allocation for this resource. The application is still free to suballocate the resource but it may get better performance if a dedicated allocation is used.
    • requiresDedicatedAllocation – specifies that a dedicated allocation is required for this resource.

    Layout

    
     struct VkMemoryDedicatedRequirements {
         VkStructureType sType;
         void * pNext;
         VkBool32 prefersDedicatedAllocation;
         VkBool32 requiresDedicatedAllocation;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, PREFERSDEDICATEDALLOCATION, REQUIRESDEDICATEDALLOCATION

        The struct member offsets.
    • Constructor Detail

      • VkMemoryDedicatedRequirements

        public VkMemoryDedicatedRequirements​(java.nio.ByteBuffer container)
        Creates a VkMemoryDedicatedRequirements instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.