All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.vulkan.VK10 Maven / Gradle / Ivy

Go to download

A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.vulkan;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.*;

import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;

/** The core Vulkan 1.0 functionality. */
public class VK10 {

    /**
     * VkResult - Vulkan command return codes
     * 
     * 
Description
* *
    *
  • {@link #VK_SUCCESS SUCCESS} Command successfully completed
  • *
  • {@link #VK_NOT_READY NOT_READY} A fence or query has not yet completed
  • *
  • {@link #VK_TIMEOUT TIMEOUT} A wait operation has not completed in the specified time
  • *
  • {@link #VK_EVENT_SET EVENT_SET} An event is signaled
  • *
  • {@link #VK_EVENT_RESET EVENT_RESET} An event is unsignaled
  • *
  • {@link #VK_INCOMPLETE INCOMPLETE} A return array was too small for the result
  • *
  • {@link KHRSwapchain#VK_SUBOPTIMAL_KHR SUBOPTIMAL_KHR} A swapchain no longer matches the surface properties exactly, but can still be used to present to the surface successfully.
  • *
  • {@link KHRDeferredHostOperations#VK_THREAD_IDLE_KHR THREAD_IDLE_KHR} A deferred operation is not complete but there is currently no work for this thread to do at the time of this call.
  • *
  • {@link KHRDeferredHostOperations#VK_THREAD_DONE_KHR THREAD_DONE_KHR} A deferred operation is not complete but there is no work remaining to assign to additional threads.
  • *
  • {@link KHRDeferredHostOperations#VK_OPERATION_DEFERRED_KHR OPERATION_DEFERRED_KHR} A deferred operation was requested and at least some of the work was deferred.
  • *
  • {@link KHRDeferredHostOperations#VK_OPERATION_NOT_DEFERRED_KHR OPERATION_NOT_DEFERRED_KHR} A deferred operation was requested and no operations were deferred.
  • *
  • {@link EXTPipelineCreationCacheControl#VK_PIPELINE_COMPILE_REQUIRED_EXT PIPELINE_COMPILE_REQUIRED_EXT} A requested pipeline creation would have required compilation, but the application requested compilation to not be performed.
  • *
* *
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY} A host memory allocation has failed.
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY} A device memory allocation has failed.
  • *
  • {@link #VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED} Initialization of an object could not be completed for implementation-specific reasons.
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST} The logical or physical device has been lost. See Lost Device
  • *
  • {@link #VK_ERROR_MEMORY_MAP_FAILED ERROR_MEMORY_MAP_FAILED} Mapping of a memory object has failed.
  • *
  • {@link #VK_ERROR_LAYER_NOT_PRESENT ERROR_LAYER_NOT_PRESENT} A requested layer is not present or could not be loaded.
  • *
  • {@link #VK_ERROR_EXTENSION_NOT_PRESENT ERROR_EXTENSION_NOT_PRESENT} A requested extension is not supported.
  • *
  • {@link #VK_ERROR_FEATURE_NOT_PRESENT ERROR_FEATURE_NOT_PRESENT} A requested feature is not supported.
  • *
  • {@link #VK_ERROR_INCOMPATIBLE_DRIVER ERROR_INCOMPATIBLE_DRIVER} The requested version of Vulkan is not supported by the driver or is otherwise incompatible for implementation-specific reasons.
  • *
  • {@link #VK_ERROR_TOO_MANY_OBJECTS ERROR_TOO_MANY_OBJECTS} Too many objects of the type have already been created.
  • *
  • {@link #VK_ERROR_FORMAT_NOT_SUPPORTED ERROR_FORMAT_NOT_SUPPORTED} A requested format is not supported on this device.
  • *
  • {@link #VK_ERROR_FRAGMENTED_POOL ERROR_FRAGMENTED_POOL} A pool allocation has failed due to fragmentation of the pool’s memory. This must only be returned if no attempt to allocate host or device memory was made to accommodate the new allocation. This should be returned in preference to {@link VK11#VK_ERROR_OUT_OF_POOL_MEMORY ERROR_OUT_OF_POOL_MEMORY}, but only if the implementation is certain that the pool allocation failure was due to fragmentation.
  • *
  • {@link KHRSurface#VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR} A surface is no longer available.
  • *
  • {@link KHRSurface#VK_ERROR_NATIVE_WINDOW_IN_USE_KHR ERROR_NATIVE_WINDOW_IN_USE_KHR} The requested window is already in use by Vulkan or another API in a manner which prevents it from being used again.
  • *
  • {@link KHRSwapchain#VK_ERROR_OUT_OF_DATE_KHR ERROR_OUT_OF_DATE_KHR} A surface has changed in such a way that it is no longer compatible with the swapchain, and further presentation requests using the swapchain will fail. Applications must query the new surface properties and recreate their swapchain if they wish to continue presenting to the surface.
  • *
  • {@link KHRDisplaySwapchain#VK_ERROR_INCOMPATIBLE_DISPLAY_KHR ERROR_INCOMPATIBLE_DISPLAY_KHR} The display used by a swapchain does not use the same presentable image layout, or is incompatible in a way that prevents sharing an image.
  • *
  • {@link NVGLSLShader#VK_ERROR_INVALID_SHADER_NV ERROR_INVALID_SHADER_NV} One or more shaders failed to compile or link. More details are reported back to the application via {@link EXTDebugReport VK_EXT_debug_report} if enabled.
  • *
  • {@link VK11#VK_ERROR_OUT_OF_POOL_MEMORY ERROR_OUT_OF_POOL_MEMORY} A pool memory allocation has failed. This must only be returned if no attempt to allocate host or device memory was made to accommodate the new allocation. If the failure was definitely due to fragmentation of the pool, {@link #VK_ERROR_FRAGMENTED_POOL ERROR_FRAGMENTED_POOL} should be returned instead.
  • *
  • {@link VK11#VK_ERROR_INVALID_EXTERNAL_HANDLE ERROR_INVALID_EXTERNAL_HANDLE} An external handle is not a valid handle of the specified type.
  • *
  • {@link VK12#VK_ERROR_FRAGMENTATION ERROR_FRAGMENTATION} A descriptor pool creation has failed due to fragmentation.
  • *
  • {@link EXTBufferDeviceAddress#VK_ERROR_INVALID_DEVICE_ADDRESS_EXT ERROR_INVALID_DEVICE_ADDRESS_EXT} A buffer creation failed because the requested address is not available.
  • *
  • {@link VK12#VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS} A buffer creation or memory allocation failed because the requested address is not available. A shader group handle assignment failed because the requested shader group handle information is no longer valid.
  • *
  • {@link EXTFullScreenExclusive#VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT} An operation on a swapchain created with {@link EXTFullScreenExclusive#VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT} failed as it did not have exlusive full-screen access. This may occur due to implementation-dependent reasons, outside of the application’s control.
  • *
  • {@link #VK_ERROR_UNKNOWN ERROR_UNKNOWN} An unknown error has occurred; either the application has provided invalid input, or an implementation failure has occurred.
  • *
* *

If a command returns a runtime error, unless otherwise specified any output parameters will have undefined contents, except that if the output parameter is a structure with {@code sType} and {@code pNext} fields, those fields will be unmodified. Any structures chained from {@code pNext} will also have undefined contents, except that {@code sType} and {@code pNext} will be unmodified.

* *

{@code VK_ERROR_OUT_OF_*_MEMORY} errors do not modify any currently existing Vulkan objects. Objects that have already been successfully created can still be used by the application.

* *
Note
* *

As a general rule, {@code Free}, {@code Release}, and {@code Reset} commands do not return {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}, while any other command with a return code may return it. Any exceptions from this rule are described for those commands.

*
* *

{@link #VK_ERROR_UNKNOWN ERROR_UNKNOWN} will be returned by an implementation when an unexpected error occurs that cannot be attributed to valid behavior of the application and implementation. Under these conditions, it may be returned from any command returning a {@code VkResult}.

* *
Note
* *

{@link #VK_ERROR_UNKNOWN ERROR_UNKNOWN} is not expected to ever be returned if the application behavior is valid, and if the implementation is bug-free. If {@link #VK_ERROR_UNKNOWN ERROR_UNKNOWN} is received, the application should be checked against the latest validation layers to verify correct behavior as much as possible. If no issues are identified it could be an implementation issue, and the implementor should be contacted for support.

*
* *

Performance-critical commands generally do not have return codes. If a runtime error occurs in such commands, the implementation will defer reporting the error until a specified point. For commands that record into command buffers ({@code vkCmd*}) runtime errors are reported by {@code vkEndCommandBuffer}.

* *
See Also
* *

{@link VkPresentInfoKHR}

*/ public static final int VK_SUCCESS = 0, VK_NOT_READY = 1, VK_TIMEOUT = 2, VK_EVENT_SET = 3, VK_EVENT_RESET = 4, VK_INCOMPLETE = 5, VK_ERROR_OUT_OF_HOST_MEMORY = -1, VK_ERROR_OUT_OF_DEVICE_MEMORY = -2, VK_ERROR_INITIALIZATION_FAILED = -3, VK_ERROR_DEVICE_LOST = -4, VK_ERROR_MEMORY_MAP_FAILED = -5, VK_ERROR_LAYER_NOT_PRESENT = -6, VK_ERROR_EXTENSION_NOT_PRESENT = -7, VK_ERROR_FEATURE_NOT_PRESENT = -8, VK_ERROR_INCOMPATIBLE_DRIVER = -9, VK_ERROR_TOO_MANY_OBJECTS = -10, VK_ERROR_FORMAT_NOT_SUPPORTED = -11, VK_ERROR_FRAGMENTED_POOL = -12, VK_ERROR_UNKNOWN = -13; /** * VkStructureType - Vulkan structure types ({@code sType}) * *
See Also
* *

{@link VkAccelerationStructureBuildGeometryInfoKHR}, {@link VkAccelerationStructureBuildSizesInfoKHR}, {@link VkAccelerationStructureCreateInfoKHR}, {@link VkAccelerationStructureCreateInfoNV}, {@link VkAccelerationStructureDeviceAddressInfoKHR}, {@link VkAccelerationStructureGeometryAabbsDataKHR}, {@link VkAccelerationStructureGeometryInstancesDataKHR}, {@link VkAccelerationStructureGeometryKHR}, {@link VkAccelerationStructureGeometryMotionTrianglesDataNV}, {@link VkAccelerationStructureGeometryTrianglesDataKHR}, {@link VkAccelerationStructureInfoNV}, {@link VkAccelerationStructureMemoryRequirementsInfoNV}, {@link VkAccelerationStructureMotionInfoNV}, {@link VkAccelerationStructureVersionInfoKHR}, {@link VkAcquireNextImageInfoKHR}, {@link VkAcquireProfilingLockInfoKHR}, {@link VkApplicationInfo}, {@link VkAttachmentDescription2}, {@link VkAttachmentDescriptionStencilLayout}, {@link VkAttachmentReference2}, {@link VkAttachmentReferenceStencilLayout}, {@link VkAttachmentSampleCountInfoAMD}, {@link VkBaseInStructure}, {@link VkBaseOutStructure}, {@link VkBindAccelerationStructureMemoryInfoNV}, {@link VkBindBufferMemoryDeviceGroupInfo}, {@link VkBindBufferMemoryInfo}, {@link VkBindImageMemoryDeviceGroupInfo}, {@link VkBindImageMemoryInfo}, {@link VkBindImageMemorySwapchainInfoKHR}, {@link VkBindImagePlaneMemoryInfo}, {@link VkBindSparseInfo}, {@link VkBlitImageInfo2KHR}, {@link VkBufferCopy2KHR}, {@link VkBufferCreateInfo}, {@link VkBufferDeviceAddressCreateInfoEXT}, {@link VkBufferDeviceAddressInfo}, {@link VkBufferImageCopy2KHR}, {@link VkBufferMemoryBarrier}, {@link VkBufferMemoryBarrier2KHR}, {@link VkBufferMemoryRequirementsInfo2}, {@link VkBufferOpaqueCaptureAddressCreateInfo}, {@link VkBufferViewCreateInfo}, {@link VkCalibratedTimestampInfoEXT}, {@link VkCheckpointData2NV}, {@link VkCheckpointDataNV}, {@link VkCommandBufferAllocateInfo}, {@link VkCommandBufferBeginInfo}, {@link VkCommandBufferInheritanceConditionalRenderingInfoEXT}, {@link VkCommandBufferInheritanceInfo}, {@link VkCommandBufferInheritanceRenderPassTransformInfoQCOM}, {@link VkCommandBufferInheritanceRenderingInfoKHR}, {@link VkCommandBufferInheritanceViewportScissorInfoNV}, {@link VkCommandBufferSubmitInfoKHR}, {@link VkCommandPoolCreateInfo}, {@link VkComputePipelineCreateInfo}, {@link VkConditionalRenderingBeginInfoEXT}, {@link VkCooperativeMatrixPropertiesNV}, {@link VkCopyAccelerationStructureInfoKHR}, {@link VkCopyAccelerationStructureToMemoryInfoKHR}, {@link VkCopyBufferInfo2KHR}, {@link VkCopyBufferToImageInfo2KHR}, {@link VkCopyCommandTransformInfoQCOM}, {@link VkCopyDescriptorSet}, {@link VkCopyImageInfo2KHR}, {@link VkCopyImageToBufferInfo2KHR}, {@link VkCopyMemoryToAccelerationStructureInfoKHR}, {@link VkCuFunctionCreateInfoNVX}, {@link VkCuLaunchInfoNVX}, {@link VkCuModuleCreateInfoNVX}, {@link VkD3D12FenceSubmitInfoKHR}, {@link VkDebugMarkerMarkerInfoEXT}, {@link VkDebugMarkerObjectNameInfoEXT}, {@link VkDebugMarkerObjectTagInfoEXT}, {@link VkDebugReportCallbackCreateInfoEXT}, {@link VkDebugUtilsLabelEXT}, {@link VkDebugUtilsMessengerCallbackDataEXT}, {@link VkDebugUtilsMessengerCreateInfoEXT}, {@link VkDebugUtilsObjectNameInfoEXT}, {@link VkDebugUtilsObjectTagInfoEXT}, {@link VkDedicatedAllocationBufferCreateInfoNV}, {@link VkDedicatedAllocationImageCreateInfoNV}, {@link VkDedicatedAllocationMemoryAllocateInfoNV}, {@link VkDependencyInfoKHR}, {@link VkDescriptorPoolCreateInfo}, {@link VkDescriptorPoolInlineUniformBlockCreateInfoEXT}, {@link VkDescriptorSetAllocateInfo}, {@link VkDescriptorSetLayoutBindingFlagsCreateInfo}, {@link VkDescriptorSetLayoutCreateInfo}, {@link VkDescriptorSetLayoutSupport}, {@link VkDescriptorSetVariableDescriptorCountAllocateInfo}, {@link VkDescriptorSetVariableDescriptorCountLayoutSupport}, {@link VkDescriptorUpdateTemplateCreateInfo}, {@link VkDeviceBufferMemoryRequirementsKHR}, {@link VkDeviceCreateInfo}, {@link VkDeviceDeviceMemoryReportCreateInfoEXT}, {@link VkDeviceDiagnosticsConfigCreateInfoNV}, {@link VkDeviceEventInfoEXT}, {@link VkDeviceGroupBindSparseInfo}, {@link VkDeviceGroupCommandBufferBeginInfo}, {@link VkDeviceGroupDeviceCreateInfo}, {@link VkDeviceGroupPresentCapabilitiesKHR}, {@link VkDeviceGroupPresentInfoKHR}, {@link VkDeviceGroupRenderPassBeginInfo}, {@link VkDeviceGroupSubmitInfo}, {@link VkDeviceGroupSwapchainCreateInfoKHR}, {@link VkDeviceImageMemoryRequirementsKHR}, {@link VkDeviceMemoryOpaqueCaptureAddressInfo}, {@link VkDeviceMemoryOverallocationCreateInfoAMD}, {@link VkDeviceMemoryReportCallbackDataEXT}, {@link VkDevicePrivateDataCreateInfoEXT}, {@link VkDeviceQueueCreateInfo}, {@link VkDeviceQueueGlobalPriorityCreateInfoEXT}, {@link VkDeviceQueueInfo2}, {@link VkDisplayEventInfoEXT}, {@link VkDisplayModeCreateInfoKHR}, {@link VkDisplayModeProperties2KHR}, {@link VkDisplayNativeHdrSurfaceCapabilitiesAMD}, {@link VkDisplayPlaneCapabilities2KHR}, {@link VkDisplayPlaneInfo2KHR}, {@link VkDisplayPlaneProperties2KHR}, {@link VkDisplayPowerInfoEXT}, {@link VkDisplayPresentInfoKHR}, {@link VkDisplayProperties2KHR}, {@link VkDisplaySurfaceCreateInfoKHR}, {@link VkDrmFormatModifierPropertiesList2EXT}, {@link VkDrmFormatModifierPropertiesListEXT}, {@link VkEventCreateInfo}, {@link VkExportFenceCreateInfo}, {@link VkExportFenceWin32HandleInfoKHR}, {@link VkExportMemoryAllocateInfo}, {@link VkExportMemoryAllocateInfoNV}, {@link VkExportMemoryWin32HandleInfoKHR}, {@link VkExportMemoryWin32HandleInfoNV}, {@link VkExportSemaphoreCreateInfo}, {@link VkExportSemaphoreWin32HandleInfoKHR}, {@link VkExternalBufferProperties}, {@link VkExternalFenceProperties}, {@link VkExternalImageFormatProperties}, {@link VkExternalMemoryBufferCreateInfo}, {@link VkExternalMemoryImageCreateInfo}, {@link VkExternalMemoryImageCreateInfoNV}, {@link VkExternalSemaphoreProperties}, {@link VkFenceCreateInfo}, {@link VkFenceGetFdInfoKHR}, {@link VkFenceGetWin32HandleInfoKHR}, {@link VkFilterCubicImageViewImageFormatPropertiesEXT}, {@link VkFormatProperties2}, {@link VkFormatProperties3KHR}, {@link VkFragmentShadingRateAttachmentInfoKHR}, {@link VkFramebufferAttachmentImageInfo}, {@link VkFramebufferAttachmentsCreateInfo}, {@link VkFramebufferCreateInfo}, {@link VkFramebufferMixedSamplesCombinationNV}, {@link VkGeneratedCommandsInfoNV}, {@link VkGeneratedCommandsMemoryRequirementsInfoNV}, {@link VkGeometryAABBNV}, {@link VkGeometryNV}, {@link VkGeometryTrianglesNV}, {@link VkGraphicsPipelineCreateInfo}, {@link VkGraphicsPipelineShaderGroupsCreateInfoNV}, {@link VkGraphicsShaderGroupCreateInfoNV}, {@link VkHdrMetadataEXT}, {@link VkHeadlessSurfaceCreateInfoEXT}, {@link VkImageBlit2KHR}, {@link VkImageCopy2KHR}, {@link VkImageCreateInfo}, {@link VkImageDrmFormatModifierExplicitCreateInfoEXT}, {@link VkImageDrmFormatModifierListCreateInfoEXT}, {@link VkImageDrmFormatModifierPropertiesEXT}, {@link VkImageFormatListCreateInfo}, {@link VkImageFormatProperties2}, {@link VkImageMemoryBarrier}, {@link VkImageMemoryBarrier2KHR}, {@link VkImageMemoryRequirementsInfo2}, {@link VkImagePlaneMemoryRequirementsInfo}, {@link VkImageResolve2KHR}, {@link VkImageSparseMemoryRequirementsInfo2}, {@link VkImageStencilUsageCreateInfo}, {@link VkImageSwapchainCreateInfoKHR}, {@link VkImageViewASTCDecodeModeEXT}, {@link VkImageViewAddressPropertiesNVX}, {@link VkImageViewCreateInfo}, {@link VkImageViewHandleInfoNVX}, {@link VkImageViewUsageCreateInfo}, {@link VkImportFenceFdInfoKHR}, {@link VkImportFenceWin32HandleInfoKHR}, {@link VkImportMemoryFdInfoKHR}, {@link VkImportMemoryHostPointerInfoEXT}, {@link VkImportMemoryWin32HandleInfoKHR}, {@link VkImportMemoryWin32HandleInfoNV}, {@link VkImportSemaphoreFdInfoKHR}, {@link VkImportSemaphoreWin32HandleInfoKHR}, {@link VkIndirectCommandsLayoutCreateInfoNV}, {@link VkIndirectCommandsLayoutTokenNV}, {@link VkInitializePerformanceApiInfoINTEL}, {@link VkInstanceCreateInfo}, {@link VkMacOSSurfaceCreateInfoMVK}, {@link VkMappedMemoryRange}, {@link VkMemoryAllocateFlagsInfo}, {@link VkMemoryAllocateInfo}, {@link VkMemoryBarrier}, {@link VkMemoryBarrier2KHR}, {@link VkMemoryDedicatedAllocateInfo}, {@link VkMemoryDedicatedRequirements}, {@link VkMemoryFdPropertiesKHR}, {@link VkMemoryGetFdInfoKHR}, {@link VkMemoryGetRemoteAddressInfoNV}, {@link VkMemoryGetWin32HandleInfoKHR}, {@link VkMemoryHostPointerPropertiesEXT}, {@link VkMemoryOpaqueCaptureAddressAllocateInfo}, {@link VkMemoryPriorityAllocateInfoEXT}, {@link VkMemoryRequirements2}, {@link VkMemoryWin32HandlePropertiesKHR}, {@link VkMetalSurfaceCreateInfoEXT}, {@link VkMultisamplePropertiesEXT}, {@link VkMultiviewPerViewAttributesInfoNVX}, {@link VkMutableDescriptorTypeCreateInfoVALVE}, {@link VkPerformanceConfigurationAcquireInfoINTEL}, {@link VkPerformanceCounterDescriptionKHR}, {@link VkPerformanceCounterKHR}, {@link VkPerformanceMarkerInfoINTEL}, {@link VkPerformanceOverrideInfoINTEL}, {@link VkPerformanceQuerySubmitInfoKHR}, {@link VkPerformanceStreamMarkerInfoINTEL}, {@link VkPhysicalDevice16BitStorageFeatures}, {@link VkPhysicalDevice4444FormatsFeaturesEXT}, {@link VkPhysicalDevice8BitStorageFeatures}, {@link VkPhysicalDeviceASTCDecodeFeaturesEXT}, {@link VkPhysicalDeviceAccelerationStructureFeaturesKHR}, {@link VkPhysicalDeviceAccelerationStructurePropertiesKHR}, {@link VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT}, {@link VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT}, {@link VkPhysicalDeviceBorderColorSwizzleFeaturesEXT}, {@link VkPhysicalDeviceBufferDeviceAddressFeatures}, {@link VkPhysicalDeviceBufferDeviceAddressFeaturesEXT}, {@link VkPhysicalDeviceCoherentMemoryFeaturesAMD}, {@link VkPhysicalDeviceColorWriteEnableFeaturesEXT}, {@link VkPhysicalDeviceComputeShaderDerivativesFeaturesNV}, {@link VkPhysicalDeviceConditionalRenderingFeaturesEXT}, {@link VkPhysicalDeviceConservativeRasterizationPropertiesEXT}, {@link VkPhysicalDeviceCooperativeMatrixFeaturesNV}, {@link VkPhysicalDeviceCooperativeMatrixPropertiesNV}, {@link VkPhysicalDeviceCornerSampledImageFeaturesNV}, {@link VkPhysicalDeviceCoverageReductionModeFeaturesNV}, {@link VkPhysicalDeviceCustomBorderColorFeaturesEXT}, {@link VkPhysicalDeviceCustomBorderColorPropertiesEXT}, {@link VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV}, {@link VkPhysicalDeviceDepthClipEnableFeaturesEXT}, {@link VkPhysicalDeviceDepthStencilResolveProperties}, {@link VkPhysicalDeviceDescriptorIndexingFeatures}, {@link VkPhysicalDeviceDescriptorIndexingProperties}, {@link VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV}, {@link VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV}, {@link VkPhysicalDeviceDeviceMemoryReportFeaturesEXT}, {@link VkPhysicalDeviceDiagnosticsConfigFeaturesNV}, {@link VkPhysicalDeviceDiscardRectanglePropertiesEXT}, {@link VkPhysicalDeviceDriverProperties}, {@link VkPhysicalDeviceDrmPropertiesEXT}, {@link VkPhysicalDeviceDynamicRenderingFeaturesKHR}, {@link VkPhysicalDeviceExclusiveScissorFeaturesNV}, {@link VkPhysicalDeviceExtendedDynamicState2FeaturesEXT}, {@link VkPhysicalDeviceExtendedDynamicStateFeaturesEXT}, {@link VkPhysicalDeviceExternalBufferInfo}, {@link VkPhysicalDeviceExternalFenceInfo}, {@link VkPhysicalDeviceExternalImageFormatInfo}, {@link VkPhysicalDeviceExternalMemoryHostPropertiesEXT}, {@link VkPhysicalDeviceExternalMemoryRDMAFeaturesNV}, {@link VkPhysicalDeviceExternalSemaphoreInfo}, {@link VkPhysicalDeviceFeatures2}, {@link VkPhysicalDeviceFloatControlsProperties}, {@link VkPhysicalDeviceFragmentDensityMap2FeaturesEXT}, {@link VkPhysicalDeviceFragmentDensityMap2PropertiesEXT}, {@link VkPhysicalDeviceFragmentDensityMapFeaturesEXT}, {@link VkPhysicalDeviceFragmentDensityMapPropertiesEXT}, {@link VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV}, {@link VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT}, {@link VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV}, {@link VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV}, {@link VkPhysicalDeviceFragmentShadingRateFeaturesKHR}, {@link VkPhysicalDeviceFragmentShadingRateKHR}, {@link VkPhysicalDeviceFragmentShadingRatePropertiesKHR}, {@link VkPhysicalDeviceGlobalPriorityQueryFeaturesEXT}, {@link VkPhysicalDeviceGroupProperties}, {@link VkPhysicalDeviceHostQueryResetFeatures}, {@link VkPhysicalDeviceIDProperties}, {@link VkPhysicalDeviceImageDrmFormatModifierInfoEXT}, {@link VkPhysicalDeviceImageFormatInfo2}, {@link VkPhysicalDeviceImageRobustnessFeaturesEXT}, {@link VkPhysicalDeviceImageViewImageFormatInfoEXT}, {@link VkPhysicalDeviceImagelessFramebufferFeatures}, {@link VkPhysicalDeviceIndexTypeUint8FeaturesEXT}, {@link VkPhysicalDeviceInheritedViewportScissorFeaturesNV}, {@link VkPhysicalDeviceInlineUniformBlockFeaturesEXT}, {@link VkPhysicalDeviceInlineUniformBlockPropertiesEXT}, {@link VkPhysicalDeviceInvocationMaskFeaturesHUAWEI}, {@link VkPhysicalDeviceLineRasterizationFeaturesEXT}, {@link VkPhysicalDeviceLineRasterizationPropertiesEXT}, {@link VkPhysicalDeviceMaintenance3Properties}, {@link VkPhysicalDeviceMaintenance4FeaturesKHR}, {@link VkPhysicalDeviceMaintenance4PropertiesKHR}, {@link VkPhysicalDeviceMemoryBudgetPropertiesEXT}, {@link VkPhysicalDeviceMemoryPriorityFeaturesEXT}, {@link VkPhysicalDeviceMemoryProperties2}, {@link VkPhysicalDeviceMeshShaderFeaturesNV}, {@link VkPhysicalDeviceMeshShaderPropertiesNV}, {@link VkPhysicalDeviceMultiDrawFeaturesEXT}, {@link VkPhysicalDeviceMultiDrawPropertiesEXT}, {@link VkPhysicalDeviceMultiviewFeatures}, {@link VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX}, {@link VkPhysicalDeviceMultiviewProperties}, {@link VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE}, {@link VkPhysicalDevicePCIBusInfoPropertiesEXT}, {@link VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT}, {@link VkPhysicalDevicePerformanceQueryFeaturesKHR}, {@link VkPhysicalDevicePerformanceQueryPropertiesKHR}, {@link VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT}, {@link VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR}, {@link VkPhysicalDevicePointClippingProperties}, {@link VkPhysicalDevicePortabilitySubsetFeaturesKHR}, {@link VkPhysicalDevicePortabilitySubsetPropertiesKHR}, {@link VkPhysicalDevicePresentIdFeaturesKHR}, {@link VkPhysicalDevicePresentWaitFeaturesKHR}, {@link VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT}, {@link VkPhysicalDevicePrivateDataFeaturesEXT}, {@link VkPhysicalDeviceProperties2}, {@link VkPhysicalDeviceProtectedMemoryFeatures}, {@link VkPhysicalDeviceProtectedMemoryProperties}, {@link VkPhysicalDeviceProvokingVertexFeaturesEXT}, {@link VkPhysicalDeviceProvokingVertexPropertiesEXT}, {@link VkPhysicalDevicePushDescriptorPropertiesKHR}, {@link VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT}, {@link VkPhysicalDeviceRayQueryFeaturesKHR}, {@link VkPhysicalDeviceRayTracingMotionBlurFeaturesNV}, {@link VkPhysicalDeviceRayTracingPipelineFeaturesKHR}, {@link VkPhysicalDeviceRayTracingPipelinePropertiesKHR}, {@link VkPhysicalDeviceRayTracingPropertiesNV}, {@link VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV}, {@link VkPhysicalDeviceRobustness2FeaturesEXT}, {@link VkPhysicalDeviceRobustness2PropertiesEXT}, {@link VkPhysicalDeviceSampleLocationsPropertiesEXT}, {@link VkPhysicalDeviceSamplerFilterMinmaxProperties}, {@link VkPhysicalDeviceSamplerYcbcrConversionFeatures}, {@link VkPhysicalDeviceScalarBlockLayoutFeatures}, {@link VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures}, {@link VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT}, {@link VkPhysicalDeviceShaderAtomicFloatFeaturesEXT}, {@link VkPhysicalDeviceShaderAtomicInt64Features}, {@link VkPhysicalDeviceShaderClockFeaturesKHR}, {@link VkPhysicalDeviceShaderCoreProperties2AMD}, {@link VkPhysicalDeviceShaderCorePropertiesAMD}, {@link VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT}, {@link VkPhysicalDeviceShaderDrawParametersFeatures}, {@link VkPhysicalDeviceShaderFloat16Int8Features}, {@link VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT}, {@link VkPhysicalDeviceShaderImageFootprintFeaturesNV}, {@link VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR}, {@link VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR}, {@link VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL}, {@link VkPhysicalDeviceShaderSMBuiltinsFeaturesNV}, {@link VkPhysicalDeviceShaderSMBuiltinsPropertiesNV}, {@link VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures}, {@link VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR}, {@link VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR}, {@link VkPhysicalDeviceShadingRateImageFeaturesNV}, {@link VkPhysicalDeviceShadingRateImagePropertiesNV}, {@link VkPhysicalDeviceSparseImageFormatInfo2}, {@link VkPhysicalDeviceSubgroupProperties}, {@link VkPhysicalDeviceSubgroupSizeControlFeaturesEXT}, {@link VkPhysicalDeviceSubgroupSizeControlPropertiesEXT}, {@link VkPhysicalDeviceSubpassShadingFeaturesHUAWEI}, {@link VkPhysicalDeviceSubpassShadingPropertiesHUAWEI}, {@link VkPhysicalDeviceSurfaceInfo2KHR}, {@link VkPhysicalDeviceSynchronization2FeaturesKHR}, {@link VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT}, {@link VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT}, {@link VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT}, {@link VkPhysicalDeviceTimelineSemaphoreFeatures}, {@link VkPhysicalDeviceTimelineSemaphoreProperties}, {@link VkPhysicalDeviceToolPropertiesEXT}, {@link VkPhysicalDeviceTransformFeedbackFeaturesEXT}, {@link VkPhysicalDeviceTransformFeedbackPropertiesEXT}, {@link VkPhysicalDeviceUniformBufferStandardLayoutFeatures}, {@link VkPhysicalDeviceVariablePointersFeatures}, {@link VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT}, {@link VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT}, {@link VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT}, {@link VkPhysicalDeviceVideoFormatInfoKHR}, {@link VkPhysicalDeviceVulkan11Features}, {@link VkPhysicalDeviceVulkan11Properties}, {@link VkPhysicalDeviceVulkan12Features}, {@link VkPhysicalDeviceVulkan12Properties}, {@link VkPhysicalDeviceVulkanMemoryModelFeatures}, {@link VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR}, {@link VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT}, {@link VkPhysicalDeviceYcbcrImageArraysFeaturesEXT}, {@link VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR}, {@link VkPipelineCacheCreateInfo}, {@link VkPipelineColorBlendAdvancedStateCreateInfoEXT}, {@link VkPipelineColorBlendStateCreateInfo}, {@link VkPipelineColorWriteCreateInfoEXT}, {@link VkPipelineCompilerControlCreateInfoAMD}, {@link VkPipelineCoverageModulationStateCreateInfoNV}, {@link VkPipelineCoverageReductionStateCreateInfoNV}, {@link VkPipelineCoverageToColorStateCreateInfoNV}, {@link VkPipelineCreationFeedbackCreateInfoEXT}, {@link VkPipelineDepthStencilStateCreateInfo}, {@link VkPipelineDiscardRectangleStateCreateInfoEXT}, {@link VkPipelineDynamicStateCreateInfo}, {@link VkPipelineExecutableInfoKHR}, {@link VkPipelineExecutableInternalRepresentationKHR}, {@link VkPipelineExecutablePropertiesKHR}, {@link VkPipelineExecutableStatisticKHR}, {@link VkPipelineFragmentShadingRateEnumStateCreateInfoNV}, {@link VkPipelineFragmentShadingRateStateCreateInfoKHR}, {@link VkPipelineInfoKHR}, {@link VkPipelineInputAssemblyStateCreateInfo}, {@link VkPipelineLayoutCreateInfo}, {@link VkPipelineLibraryCreateInfoKHR}, {@link VkPipelineMultisampleStateCreateInfo}, {@link VkPipelineRasterizationConservativeStateCreateInfoEXT}, {@link VkPipelineRasterizationDepthClipStateCreateInfoEXT}, {@link VkPipelineRasterizationLineStateCreateInfoEXT}, {@link VkPipelineRasterizationProvokingVertexStateCreateInfoEXT}, {@link VkPipelineRasterizationStateCreateInfo}, {@link VkPipelineRasterizationStateRasterizationOrderAMD}, {@link VkPipelineRasterizationStateStreamCreateInfoEXT}, {@link VkPipelineRenderingCreateInfoKHR}, {@link VkPipelineRepresentativeFragmentTestStateCreateInfoNV}, {@link VkPipelineSampleLocationsStateCreateInfoEXT}, {@link VkPipelineShaderStageCreateInfo}, {@link VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT}, {@link VkPipelineTessellationDomainOriginStateCreateInfo}, {@link VkPipelineTessellationStateCreateInfo}, {@link VkPipelineVertexInputDivisorStateCreateInfoEXT}, {@link VkPipelineVertexInputStateCreateInfo}, {@link VkPipelineViewportCoarseSampleOrderStateCreateInfoNV}, {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV}, {@link VkPipelineViewportShadingRateImageStateCreateInfoNV}, {@link VkPipelineViewportStateCreateInfo}, {@link VkPipelineViewportSwizzleStateCreateInfoNV}, {@link VkPipelineViewportWScalingStateCreateInfoNV}, {@link VkPresentIdKHR}, {@link VkPresentInfoKHR}, {@link VkPresentRegionsKHR}, {@link VkPresentTimesInfoGOOGLE}, {@link VkPrivateDataSlotCreateInfoEXT}, {@link VkProtectedSubmitInfo}, {@link VkQueryPoolCreateInfo}, {@link VkQueryPoolPerformanceCreateInfoKHR}, {@link VkQueryPoolPerformanceQueryCreateInfoINTEL}, {@link VkQueueFamilyCheckpointProperties2NV}, {@link VkQueueFamilyCheckpointPropertiesNV}, {@link VkQueueFamilyGlobalPriorityPropertiesEXT}, {@link VkQueueFamilyProperties2}, {@link VkRayTracingPipelineCreateInfoKHR}, {@link VkRayTracingPipelineCreateInfoNV}, {@link VkRayTracingPipelineInterfaceCreateInfoKHR}, {@link VkRayTracingShaderGroupCreateInfoKHR}, {@link VkRayTracingShaderGroupCreateInfoNV}, {@link VkRenderPassAttachmentBeginInfo}, {@link VkRenderPassBeginInfo}, {@link VkRenderPassCreateInfo}, {@link VkRenderPassCreateInfo2}, {@link VkRenderPassFragmentDensityMapCreateInfoEXT}, {@link VkRenderPassInputAttachmentAspectCreateInfo}, {@link VkRenderPassMultiviewCreateInfo}, {@link VkRenderPassSampleLocationsBeginInfoEXT}, {@link VkRenderPassTransformBeginInfoQCOM}, {@link VkRenderingAttachmentInfoKHR}, {@link VkRenderingFragmentDensityMapAttachmentInfoEXT}, {@link VkRenderingFragmentShadingRateAttachmentInfoKHR}, {@link VkRenderingInfoKHR}, {@link VkResolveImageInfo2KHR}, {@link VkSampleLocationsInfoEXT}, {@link VkSamplerBorderColorComponentMappingCreateInfoEXT}, {@link VkSamplerCreateInfo}, {@link VkSamplerCustomBorderColorCreateInfoEXT}, {@link VkSamplerReductionModeCreateInfo}, {@link VkSamplerYcbcrConversionCreateInfo}, {@link VkSamplerYcbcrConversionImageFormatProperties}, {@link VkSamplerYcbcrConversionInfo}, {@link VkSemaphoreCreateInfo}, {@link VkSemaphoreGetFdInfoKHR}, {@link VkSemaphoreGetWin32HandleInfoKHR}, {@link VkSemaphoreSignalInfo}, {@link VkSemaphoreSubmitInfoKHR}, {@link VkSemaphoreTypeCreateInfo}, {@link VkSemaphoreWaitInfo}, {@link VkShaderModuleCreateInfo}, {@link VkShaderModuleValidationCacheCreateInfoEXT}, {@link VkSharedPresentSurfaceCapabilitiesKHR}, {@link VkSparseImageFormatProperties2}, {@link VkSparseImageMemoryRequirements2}, {@link VkSubmitInfo}, {@link VkSubmitInfo2KHR}, {@link VkSubpassBeginInfo}, {@link VkSubpassDependency2}, {@link VkSubpassDescription2}, {@link VkSubpassDescriptionDepthStencilResolve}, {@link VkSubpassEndInfo}, {@link VkSubpassShadingPipelineCreateInfoHUAWEI}, {@link VkSurfaceCapabilities2EXT}, {@link VkSurfaceCapabilities2KHR}, {@link VkSurfaceCapabilitiesFullScreenExclusiveEXT}, {@link VkSurfaceFormat2KHR}, {@link VkSurfaceFullScreenExclusiveInfoEXT}, {@link VkSurfaceFullScreenExclusiveWin32InfoEXT}, {@link VkSurfaceProtectedCapabilitiesKHR}, {@link VkSwapchainCounterCreateInfoEXT}, {@link VkSwapchainCreateInfoKHR}, {@link VkSwapchainDisplayNativeHdrCreateInfoAMD}, {@link VkTextureLODGatherFormatPropertiesAMD}, {@link VkTimelineSemaphoreSubmitInfo}, {@link VkValidationCacheCreateInfoEXT}, {@link VkValidationFeaturesEXT}, {@link VkValidationFlagsEXT}, {@link VkVertexInputAttributeDescription2EXT}, {@link VkVertexInputBindingDescription2EXT}, {@link VkVideoBeginCodingInfoKHR}, {@link VkVideoBindMemoryKHR}, {@link VkVideoCapabilitiesKHR}, {@link VkVideoCodingControlInfoKHR}, {@link VkVideoDecodeH264CapabilitiesEXT}, {@link VkVideoDecodeH264DpbSlotInfoEXT}, {@link VkVideoDecodeH264MvcEXT}, {@link VkVideoDecodeH264PictureInfoEXT}, {@link VkVideoDecodeH264ProfileEXT}, {@link VkVideoDecodeH264SessionCreateInfoEXT}, {@link VkVideoDecodeH264SessionParametersAddInfoEXT}, {@link VkVideoDecodeH264SessionParametersCreateInfoEXT}, {@link VkVideoDecodeH265CapabilitiesEXT}, {@link VkVideoDecodeH265DpbSlotInfoEXT}, {@link VkVideoDecodeH265PictureInfoEXT}, {@link VkVideoDecodeH265ProfileEXT}, {@link VkVideoDecodeH265SessionCreateInfoEXT}, {@link VkVideoDecodeH265SessionParametersAddInfoEXT}, {@link VkVideoDecodeH265SessionParametersCreateInfoEXT}, {@link VkVideoDecodeInfoKHR}, {@link VkVideoEncodeH264CapabilitiesEXT}, {@link VkVideoEncodeH264DpbSlotInfoEXT}, {@link VkVideoEncodeH264EmitPictureParametersEXT}, {@link VkVideoEncodeH264NaluSliceEXT}, {@link VkVideoEncodeH264ProfileEXT}, {@link VkVideoEncodeH264SessionCreateInfoEXT}, {@link VkVideoEncodeH264SessionParametersAddInfoEXT}, {@link VkVideoEncodeH264SessionParametersCreateInfoEXT}, {@link VkVideoEncodeH264VclFrameInfoEXT}, {@link VkVideoEncodeH265CapabilitiesEXT}, {@link VkVideoEncodeH265DpbSlotInfoEXT}, {@link VkVideoEncodeH265EmitPictureParametersEXT}, {@link VkVideoEncodeH265NaluSliceEXT}, {@link VkVideoEncodeH265ProfileEXT}, {@link VkVideoEncodeH265ReferenceListsEXT}, {@link VkVideoEncodeH265SessionCreateInfoEXT}, {@link VkVideoEncodeH265SessionParametersAddInfoEXT}, {@link VkVideoEncodeH265SessionParametersCreateInfoEXT}, {@link VkVideoEncodeH265VclFrameInfoEXT}, {@link VkVideoEncodeInfoKHR}, {@link VkVideoEncodeRateControlInfoKHR}, {@link VkVideoEndCodingInfoKHR}, {@link VkVideoFormatPropertiesKHR}, {@link VkVideoGetMemoryPropertiesKHR}, {@link VkVideoPictureResourceKHR}, {@link VkVideoProfileKHR}, {@link VkVideoProfilesKHR}, {@link VkVideoQueueFamilyProperties2KHR}, {@link VkVideoReferenceSlotKHR}, {@link VkVideoSessionCreateInfoKHR}, {@link VkVideoSessionParametersCreateInfoKHR}, {@link VkVideoSessionParametersUpdateInfoKHR}, {@link VkWaylandSurfaceCreateInfoKHR}, {@link VkWin32KeyedMutexAcquireReleaseInfoKHR}, {@link VkWin32KeyedMutexAcquireReleaseInfoNV}, {@link VkWin32SurfaceCreateInfoKHR}, {@link VkWriteDescriptorSet}, {@link VkWriteDescriptorSetAccelerationStructureKHR}, {@link VkWriteDescriptorSetAccelerationStructureNV}, {@link VkWriteDescriptorSetInlineUniformBlockEXT}, {@link VkXlibSurfaceCreateInfoKHR}

* *
Enum values:
* *
    *
  • {@link #VK_STRUCTURE_TYPE_APPLICATION_INFO STRUCTURE_TYPE_APPLICATION_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO STRUCTURE_TYPE_INSTANCE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO STRUCTURE_TYPE_DEVICE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_SUBMIT_INFO STRUCTURE_TYPE_SUBMIT_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE STRUCTURE_TYPE_MAPPED_MEMORY_RANGE}
  • *
  • {@link #VK_STRUCTURE_TYPE_BIND_SPARSE_INFO STRUCTURE_TYPE_BIND_SPARSE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_FENCE_CREATE_INFO STRUCTURE_TYPE_FENCE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_EVENT_CREATE_INFO STRUCTURE_TYPE_EVENT_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO STRUCTURE_TYPE_BUFFER_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO STRUCTURE_TYPE_IMAGE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO STRUCTURE_TYPE_SAMPLER_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET}
  • *
  • {@link #VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET STRUCTURE_TYPE_COPY_DESCRIPTOR_SET}
  • *
  • {@link #VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER}
  • *
  • {@link #VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER}
  • *
  • {@link #VK_STRUCTURE_TYPE_MEMORY_BARRIER STRUCTURE_TYPE_MEMORY_BARRIER}
  • *
  • {@link #VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO}
  • *
  • {@link #VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO}
  • *
*/ public static final int VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48; /** * VkAccessFlagBits - Bitmask specifying memory access types that will participate in a memory dependency * *
Description
* *

These values all have the same meaning as the equivalently named values for {@code VkAccessFlags2KHR}.

* *
    *
  • {@link KHRSynchronization2#VK_ACCESS_NONE_KHR ACCESS_NONE_KHR} specifies no accesses.
  • *
  • {@link #VK_ACCESS_MEMORY_READ_BIT ACCESS_MEMORY_READ_BIT} specifies all read accesses. It is always valid in any access mask, and is treated as equivalent to setting all {@code READ} access flags that are valid where it is used.
  • *
  • {@link #VK_ACCESS_MEMORY_WRITE_BIT ACCESS_MEMORY_WRITE_BIT} specifies all write accesses. It is always valid in any access mask, and is treated as equivalent to setting all {@code WRITE} access flags that are valid where it is used.
  • *
  • {@link #VK_ACCESS_INDIRECT_COMMAND_READ_BIT ACCESS_INDIRECT_COMMAND_READ_BIT} specifies read access to indirect command data read as part of an indirect build, trace, drawing or dispatching command. Such access occurs in the {@link #VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT PIPELINE_STAGE_DRAW_INDIRECT_BIT} pipeline stage.
  • *
  • {@link #VK_ACCESS_INDEX_READ_BIT ACCESS_INDEX_READ_BIT} specifies read access to an index buffer as part of an indexed drawing command, bound by {@link #vkCmdBindIndexBuffer CmdBindIndexBuffer}. Such access occurs in the {@link #VK_PIPELINE_STAGE_VERTEX_INPUT_BIT PIPELINE_STAGE_VERTEX_INPUT_BIT} pipeline stage.
  • *
  • {@link #VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT ACCESS_VERTEX_ATTRIBUTE_READ_BIT} specifies read access to a vertex buffer as part of a drawing command, bound by {@link #vkCmdBindVertexBuffers CmdBindVertexBuffers}. Such access occurs in the {@link #VK_PIPELINE_STAGE_VERTEX_INPUT_BIT PIPELINE_STAGE_VERTEX_INPUT_BIT} pipeline stage.
  • *
  • {@link #VK_ACCESS_UNIFORM_READ_BIT ACCESS_UNIFORM_READ_BIT} specifies read access to a uniform buffer in any shader pipeline stage.
  • *
  • {@link #VK_ACCESS_INPUT_ATTACHMENT_READ_BIT ACCESS_INPUT_ATTACHMENT_READ_BIT} specifies read access to an input attachment within a render pass during subpass shading or fragment shading. Such access occurs in the {@link HUAWEISubpassShading#VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI} or {@link #VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT PIPELINE_STAGE_FRAGMENT_SHADER_BIT} pipeline stage.
  • *
  • {@link #VK_ACCESS_SHADER_READ_BIT ACCESS_SHADER_READ_BIT} specifies read access to a uniform buffer, uniform texel buffer, sampled image, storage buffer, physical storage buffer, shader binding table, storage texel buffer, or storage image in any shader pipeline stage.
  • *
  • {@link #VK_ACCESS_SHADER_WRITE_BIT ACCESS_SHADER_WRITE_BIT} specifies write access to a storage buffer, physical storage buffer, storage texel buffer, or storage image in any shader pipeline stage.
  • *
  • {@link #VK_ACCESS_COLOR_ATTACHMENT_READ_BIT ACCESS_COLOR_ATTACHMENT_READ_BIT} specifies read access to a color attachment, such as via blending, logic operations, or via certain subpass load operations. It does not include advanced blend operations. Such access occurs in the {@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT} pipeline stage.
  • *
  • {@link #VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT ACCESS_COLOR_ATTACHMENT_WRITE_BIT} specifies write access to a color, resolve, or depth/stencil resolve attachment during a render pass or via certain subpass load and store operations. Such access occurs in the {@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT} pipeline stage.
  • *
  • {@link #VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT} specifies read access to a depth/stencil attachment, via depth or stencil operations or via certain subpass load operations. Such access occurs in the {@link #VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT} or {@link #VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT} pipeline stages.
  • *
  • {@link #VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT} specifies write access to a depth/stencil attachment, via depth or stencil operations or via certain subpass load and store operations. Such access occurs in the {@link #VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT} or {@link #VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT} pipeline stages.
  • *
  • {@link #VK_ACCESS_TRANSFER_READ_BIT ACCESS_TRANSFER_READ_BIT} specifies read access to an image or buffer in a copy operation. Such access occurs in the {@link KHRSynchronization2#VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR} pipeline stage.
  • *
  • {@link #VK_ACCESS_TRANSFER_WRITE_BIT ACCESS_TRANSFER_WRITE_BIT} specifies write access to an image or buffer in a clear or copy operation. Such access occurs in the {@link KHRSynchronization2#VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR} pipeline stage.
  • *
  • {@link #VK_ACCESS_HOST_READ_BIT ACCESS_HOST_READ_BIT} specifies read access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the {@link #VK_PIPELINE_STAGE_HOST_BIT PIPELINE_STAGE_HOST_BIT} pipeline stage.
  • *
  • {@link #VK_ACCESS_HOST_WRITE_BIT ACCESS_HOST_WRITE_BIT} specifies write access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the {@link #VK_PIPELINE_STAGE_HOST_BIT PIPELINE_STAGE_HOST_BIT} pipeline stage.
  • *
  • {@link EXTConditionalRendering#VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT} specifies read access to a predicate as part of conditional rendering. Such access occurs in the {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT} pipeline stage.
  • *
  • {@link EXTTransformFeedback#VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT} specifies write access to a transform feedback buffer made when transform feedback is active. Such access occurs in the {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT} pipeline stage.
  • *
  • {@link EXTTransformFeedback#VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT} specifies read access to a transform feedback counter buffer which is read when {@code vkCmdBeginTransformFeedbackEXT} executes. Such access occurs in the {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT} pipeline stage.
  • *
  • {@link EXTTransformFeedback#VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT} specifies write access to a transform feedback counter buffer which is written when {@code vkCmdEndTransformFeedbackEXT} executes. Such access occurs in the {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT} pipeline stage.
  • *
  • {@link NVDeviceGeneratedCommands#VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV ACCESS_COMMAND_PREPROCESS_READ_BIT_NV} specifies reads from buffer inputs to {@link NVDeviceGeneratedCommands#vkCmdPreprocessGeneratedCommandsNV CmdPreprocessGeneratedCommandsNV}. Such access occurs in the {@link NVDeviceGeneratedCommands#VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV} pipeline stage.
  • *
  • {@link NVDeviceGeneratedCommands#VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV} specifies writes to the target command buffer:VkBuffer preprocess outputs in {@link NVDeviceGeneratedCommands#vkCmdPreprocessGeneratedCommandsNV CmdPreprocessGeneratedCommandsNV}. Such access occurs in the {@link NVDeviceGeneratedCommands#VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV} pipeline stage.
  • *
  • {@link EXTBlendOperationAdvanced#VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT} specifies read access to color attachments, including advanced blend operations. Such access occurs in the {@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT} pipeline stage.
  • *
  • {@link HUAWEIInvocationMask#VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI} specifies read access to a invocation mask image in the {@link HUAWEIInvocationMask#VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI} pipeline stage.
  • *
  • {@link KHRAccelerationStructure#VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR} specifies read access to an acceleration structure as part of a trace, build, or copy command, or to an acceleration structure scratch buffer as part of a build command. Such access occurs in the {@link KHRRayTracingPipeline#VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR} pipeline stage or {@link KHRAccelerationStructure#VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR} pipeline stage.
  • *
  • {@link KHRAccelerationStructure#VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR} specifies write access to an acceleration structure or acceleration structure scratch buffer as part of a build or copy command. Such access occurs in the {@link KHRAccelerationStructure#VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR} pipeline stage.
  • *
  • {@link EXTFragmentDensityMap#VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT} specifies read access to a fragment density map attachment during dynamic fragment density map operations Such access occurs in the {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT} pipeline stage.
  • *
  • {@link KHRFragmentShadingRate#VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR} specifies read access to a fragment shading rate attachment during rasterization. Such access occurs in the {@link KHRFragmentShadingRate#VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR} pipeline stage.
  • *
  • {@link NVShadingRateImage#VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV} specifies read access to a shading rate image during rasterization. Such access occurs in the {@link NVShadingRateImage#VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV} pipeline stage. It is equivalent to {@link KHRFragmentShadingRate#VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR}.
  • *
* *

Certain access types are only performed by a subset of pipeline stages. Any synchronization command that takes both stage masks and access masks uses both to define the access scopes - only the specified access types performed by the specified stages are included in the access scope. An application must not specify an access flag in a synchronization command if it does not include a pipeline stage in the corresponding stage mask that is able to perform accesses of that type. The following table lists, for each access flag, which pipeline stages can perform that type of access.

* *
Supported access types
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Access flagSupported pipeline stages
{@link #VK_ACCESS_INDIRECT_COMMAND_READ_BIT ACCESS_INDIRECT_COMMAND_READ_BIT}{@link #VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT PIPELINE_STAGE_DRAW_INDIRECT_BIT} , {@link KHRAccelerationStructure#VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR}
{@link #VK_ACCESS_INDEX_READ_BIT ACCESS_INDEX_READ_BIT}{@link #VK_PIPELINE_STAGE_VERTEX_INPUT_BIT PIPELINE_STAGE_VERTEX_INPUT_BIT}
{@link #VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT ACCESS_VERTEX_ATTRIBUTE_READ_BIT}{@link #VK_PIPELINE_STAGE_VERTEX_INPUT_BIT PIPELINE_STAGE_VERTEX_INPUT_BIT}
{@link #VK_ACCESS_UNIFORM_READ_BIT ACCESS_UNIFORM_READ_BIT}{@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}, {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}, {@link KHRRayTracingPipeline#VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR}, {@link #VK_PIPELINE_STAGE_VERTEX_SHADER_BIT PIPELINE_STAGE_VERTEX_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT PIPELINE_STAGE_FRAGMENT_SHADER_BIT}, or {@link #VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT PIPELINE_STAGE_COMPUTE_SHADER_BIT}
{@link #VK_ACCESS_SHADER_READ_BIT ACCESS_SHADER_READ_BIT}{@link KHRAccelerationStructure#VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR}, {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}, {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}, {@link KHRRayTracingPipeline#VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR}, {@link #VK_PIPELINE_STAGE_VERTEX_SHADER_BIT PIPELINE_STAGE_VERTEX_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT PIPELINE_STAGE_FRAGMENT_SHADER_BIT}, or {@link #VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT PIPELINE_STAGE_COMPUTE_SHADER_BIT}
{@link #VK_ACCESS_SHADER_WRITE_BIT ACCESS_SHADER_WRITE_BIT}{@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}, {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}, {@link KHRRayTracingPipeline#VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR}, {@link #VK_PIPELINE_STAGE_VERTEX_SHADER_BIT PIPELINE_STAGE_VERTEX_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT PIPELINE_STAGE_FRAGMENT_SHADER_BIT}, or {@link #VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT PIPELINE_STAGE_COMPUTE_SHADER_BIT}
{@link #VK_ACCESS_INPUT_ATTACHMENT_READ_BIT ACCESS_INPUT_ATTACHMENT_READ_BIT}{@link HUAWEISubpassShading#VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI}, or {@link #VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT PIPELINE_STAGE_FRAGMENT_SHADER_BIT}
{@link #VK_ACCESS_COLOR_ATTACHMENT_READ_BIT ACCESS_COLOR_ATTACHMENT_READ_BIT}{@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT}
{@link #VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT ACCESS_COLOR_ATTACHMENT_WRITE_BIT}{@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT}
{@link #VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT}{@link #VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT}, or {@link #VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT}
{@link #VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT}{@link #VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT}, or {@link #VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT}
{@link #VK_ACCESS_TRANSFER_READ_BIT ACCESS_TRANSFER_READ_BIT}{@link #VK_PIPELINE_STAGE_TRANSFER_BIT PIPELINE_STAGE_TRANSFER_BIT} or {@link KHRAccelerationStructure#VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR}
{@link #VK_ACCESS_TRANSFER_WRITE_BIT ACCESS_TRANSFER_WRITE_BIT}{@link #VK_PIPELINE_STAGE_TRANSFER_BIT PIPELINE_STAGE_TRANSFER_BIT} or {@link KHRAccelerationStructure#VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR}
{@link #VK_ACCESS_HOST_READ_BIT ACCESS_HOST_READ_BIT}{@link #VK_PIPELINE_STAGE_HOST_BIT PIPELINE_STAGE_HOST_BIT}
{@link #VK_ACCESS_HOST_WRITE_BIT ACCESS_HOST_WRITE_BIT}{@link #VK_PIPELINE_STAGE_HOST_BIT PIPELINE_STAGE_HOST_BIT}
{@link #VK_ACCESS_MEMORY_READ_BIT ACCESS_MEMORY_READ_BIT}Any
{@link #VK_ACCESS_MEMORY_WRITE_BIT ACCESS_MEMORY_WRITE_BIT}Any
{@link EXTBlendOperationAdvanced#VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT}{@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT}
{@link NVDeviceGeneratedCommands#VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV ACCESS_COMMAND_PREPROCESS_READ_BIT_NV}{@link NVDeviceGeneratedCommands#VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV}
{@link NVDeviceGeneratedCommands#VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV}{@link NVDeviceGeneratedCommands#VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV}
{@link EXTConditionalRendering#VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT}{@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT}
{@link KHRFragmentShadingRate#VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR}{@link KHRFragmentShadingRate#VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR}
{@link HUAWEIInvocationMask#VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI}{@link HUAWEIInvocationMask#VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI}
{@link EXTTransformFeedback#VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT}{@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
{@link EXTTransformFeedback#VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT}{@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
{@link EXTTransformFeedback#VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT}{@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}, {@link #VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT PIPELINE_STAGE_DRAW_INDIRECT_BIT}
{@link KHRAccelerationStructure#VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR}{@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}, {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}, {@link #VK_PIPELINE_STAGE_VERTEX_SHADER_BIT PIPELINE_STAGE_VERTEX_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT PIPELINE_STAGE_FRAGMENT_SHADER_BIT}, {@link #VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT PIPELINE_STAGE_COMPUTE_SHADER_BIT}, {@link KHRRayTracingPipeline#VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR}, or {@link KHRAccelerationStructure#VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR}
{@link KHRAccelerationStructure#VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR}{@link KHRAccelerationStructure#VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR}
{@link EXTFragmentDensityMap#VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT}{@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT}
*/ public static final int VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x1, VK_ACCESS_INDEX_READ_BIT = 0x2, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x4, VK_ACCESS_UNIFORM_READ_BIT = 0x8, VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x10, VK_ACCESS_SHADER_READ_BIT = 0x20, VK_ACCESS_SHADER_WRITE_BIT = 0x40, VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x80, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x100, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x200, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x400, VK_ACCESS_TRANSFER_READ_BIT = 0x800, VK_ACCESS_TRANSFER_WRITE_BIT = 0x1000, VK_ACCESS_HOST_READ_BIT = 0x2000, VK_ACCESS_HOST_WRITE_BIT = 0x4000, VK_ACCESS_MEMORY_READ_BIT = 0x8000, VK_ACCESS_MEMORY_WRITE_BIT = 0x10000; /** * VkImageLayout - Layout of image and image subresources * *
Description
* *

The type(s) of device access supported by each layout are:

* *
    *
  • {@link #VK_IMAGE_LAYOUT_UNDEFINED IMAGE_LAYOUT_UNDEFINED} specifies that the layout is unknown. Image memory cannot be transitioned into this layout. This layout can be used as the {@code initialLayout} member of {@link VkImageCreateInfo}. This layout can be used in place of the current image layout in a layout transition, but doing so will cause the contents of the image’s memory to be undefined.
  • *
  • {@link #VK_IMAGE_LAYOUT_PREINITIALIZED IMAGE_LAYOUT_PREINITIALIZED} specifies that an image’s memory is in a defined layout and can be populated by data, but that it has not yet been initialized by the driver. Image memory cannot be transitioned into this layout. This layout can be used as the {@code initialLayout} member of {@link VkImageCreateInfo}. This layout is intended to be used as the initial layout for an image whose contents are written by the host, and hence the data can be written to memory immediately, without first executing a layout transition. Currently, {@link #VK_IMAGE_LAYOUT_PREINITIALIZED IMAGE_LAYOUT_PREINITIALIZED} is only useful with linear images because there is not a standard layout defined for {@link #VK_IMAGE_TILING_OPTIMAL IMAGE_TILING_OPTIMAL} images.
  • *
  • {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL} supports all types of device access.
  • *
  • {@link KHRSynchronization2#VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR} specifies a layout that must only be used with attachment accesses in the graphics pipeline.
  • *
  • {@link KHRSynchronization2#VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR} specifies a layout allowing read only access as an attachment, or in shaders as a sampled image, combined image/sampler, or input attachment.
  • *
  • {@link #VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL} must only be used as a color or resolve attachment in a {@code VkFramebuffer}. This layout is valid only for image subresources of images created with the {@link #VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT IMAGE_USAGE_COLOR_ATTACHMENT_BIT} usage bit enabled.
  • *
  • {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL} specifies a layout for both the depth and stencil aspects of a depth/stencil format image allowing read and write access as a depth/stencil attachment. It is equivalent to {@link VK12#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL} and {@link VK12#VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL}.
  • *
  • {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL} specifies a layout for both the depth and stencil aspects of a depth/stencil format image allowing read only access as a depth/stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment. It is equivalent to {@link VK12#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL} and {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL}.
  • *
  • {@link VK11#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL} specifies a layout for depth/stencil format images allowing read and write access to the stencil aspect as a stencil attachment, and read only access to the depth aspect as a depth attachment or in shaders as a sampled image, combined image/sampler, or input attachment. It is equivalent to {@link VK12#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL} and {@link VK12#VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL}.
  • *
  • {@link VK11#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL} specifies a layout for depth/stencil format images allowing read and write access to the depth aspect as a depth attachment, and read only access to the stencil aspect as a stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment. It is equivalent to {@link VK12#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL} and {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL}.
  • *
  • {@link VK12#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL} specifies a layout for the depth aspect of a depth/stencil format image allowing read and write access as a depth attachment.
  • *
  • {@link VK12#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL} specifies a layout for the depth aspect of a depth/stencil format image allowing read-only access as a depth attachment or in shaders as a sampled image, combined image/sampler, or input attachment.
  • *
  • {@link VK12#VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL} specifies a layout for the stencil aspect of a depth/stencil format image allowing read and write access as a stencil attachment.
  • *
  • {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL} specifies a layout for the stencil aspect of a depth/stencil format image allowing read-only access as a stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment.
  • *
  • {@link #VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL} specifies a layout allowing read-only access in a shader as a sampled image, combined image/sampler, or input attachment. This layout is valid only for image subresources of images created with the {@link #VK_IMAGE_USAGE_SAMPLED_BIT IMAGE_USAGE_SAMPLED_BIT} or {@link #VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT IMAGE_USAGE_INPUT_ATTACHMENT_BIT} usage bits enabled.
  • *
  • {@link #VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL} must only be used as a source image of a transfer command (see the definition of {@link #VK_PIPELINE_STAGE_TRANSFER_BIT PIPELINE_STAGE_TRANSFER_BIT}). This layout is valid only for image subresources of images created with the {@link #VK_IMAGE_USAGE_TRANSFER_SRC_BIT IMAGE_USAGE_TRANSFER_SRC_BIT} usage bit enabled.
  • *
  • {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL} must only be used as a destination image of a transfer command. This layout is valid only for image subresources of images created with the {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} usage bit enabled.
  • *
  • {@link KHRSwapchain#VK_IMAGE_LAYOUT_PRESENT_SRC_KHR IMAGE_LAYOUT_PRESENT_SRC_KHR} must only be used for presenting a presentable image for display. A swapchain’s image must be transitioned to this layout before calling {@link KHRSwapchain#vkQueuePresentKHR QueuePresentKHR}, and must be transitioned away from this layout after calling {@link KHRSwapchain#vkAcquireNextImageKHR AcquireNextImageKHR}.
  • *
  • {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR} is valid only for shared presentable images, and must be used for any usage the image supports.
  • *
  • {@link KHRFragmentShadingRate#VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR} must only be used as a fragment shading rate attachment or shading rate image. This layout is valid only for image subresources of images created with the {@link KHRFragmentShadingRate#VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR} usage bit enabled.
  • *
  • {@link EXTFragmentDensityMap#VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT} must only be used as a fragment density map attachment in a {@code VkRenderPass}. This layout is valid only for image subresources of images created with the {@link EXTFragmentDensityMap#VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT} usage bit enabled.
  • *
  • {@link KHRVideoDecodeQueue#VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR} must only be used as a decode output image of a video decode operation. This layout is valid only for image subresources of images created with the {@link KHRVideoDecodeQueue#VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR} usage bit enabled.
  • *
  • {@link KHRVideoDecodeQueue#VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR} must only be used as a decode source image of a video decode operation. This layout is valid only for image subresources of images created with the {@link KHRVideoDecodeQueue#VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR} usage bit enabled.
  • *
  • {@link KHRVideoDecodeQueue#VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR} must only be used as a decode source or destination image of a video decode operation. This layout is valid only for image subresources of images created with the {@link KHRVideoDecodeQueue#VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR} usage bit enabled.
  • *
  • {@link KHRVideoEncodeQueue#VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR} must only be used as a encode output image of a video encode operation. This layout is valid only for image subresources of images created with the {@link KHRVideoEncodeQueue#VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR} usage bit enabled.
  • *
  • {@link KHRVideoEncodeQueue#VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR} must only be used as a encode source image of a video encode operation. This layout is valid only for image subresources of images created with the {@link KHRVideoEncodeQueue#VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR} usage bit enabled.
  • *
  • {@link KHRVideoEncodeQueue#VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR} must only be used as a encode source or destination image of a video encode operation. This layout is valid only for image subresources of images created with the {@link KHRVideoEncodeQueue#VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR} usage bit enabled.
  • *
* *

The layout of each image subresource is not a state of the image subresource itself, but is rather a property of how the data in memory is organized, and thus for each mechanism of accessing an image in the API the application must specify a parameter or structure member that indicates which image layout the image subresource(s) are considered to be in when the image will be accessed. For transfer commands, this is a parameter to the command (see Clear Commands and Copy Commands). For use as a framebuffer attachment, this is a member in the substructures of the {@link VkRenderPassCreateInfo} (see Render Pass). For use in a descriptor set, this is a member in the {@link VkDescriptorImageInfo} structure (see Descriptor Set Updates).

* *
See Also
* *

{@link VkAttachmentDescription}, {@link VkAttachmentDescription2}, {@link VkAttachmentDescriptionStencilLayout}, {@link VkAttachmentReference}, {@link VkAttachmentReference2}, {@link VkAttachmentReferenceStencilLayout}, {@link VkBlitImageInfo2KHR}, {@link VkCopyBufferToImageInfo2KHR}, {@link VkCopyImageInfo2KHR}, {@link VkCopyImageToBufferInfo2KHR}, {@link VkDescriptorImageInfo}, {@link VkImageCreateInfo}, {@link VkImageMemoryBarrier}, {@link VkImageMemoryBarrier2KHR}, {@link VkRenderingAttachmentInfoKHR}, {@link VkRenderingFragmentDensityMapAttachmentInfoEXT}, {@link VkRenderingFragmentShadingRateAttachmentInfoKHR}, {@link VkResolveImageInfo2KHR}, {@link HUAWEIInvocationMask#vkCmdBindInvocationMaskHUAWEI CmdBindInvocationMaskHUAWEI}, {@link NVShadingRateImage#vkCmdBindShadingRateImageNV CmdBindShadingRateImageNV}, {@link #vkCmdBlitImage CmdBlitImage}, {@link #vkCmdClearColorImage CmdClearColorImage}, {@link #vkCmdClearDepthStencilImage CmdClearDepthStencilImage}, {@link #vkCmdCopyBufferToImage CmdCopyBufferToImage}, {@link #vkCmdCopyImage CmdCopyImage}, {@link #vkCmdCopyImageToBuffer CmdCopyImageToBuffer}, {@link #vkCmdResolveImage CmdResolveImage}

*/ public static final int VK_IMAGE_LAYOUT_UNDEFINED = 0, VK_IMAGE_LAYOUT_GENERAL = 1, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7, VK_IMAGE_LAYOUT_PREINITIALIZED = 8; /** * VkImageAspectFlagBits - Bitmask specifying which aspects of an image are included in a view * *
Description
* *
    *
  • {@link #VK_IMAGE_ASPECT_COLOR_BIT IMAGE_ASPECT_COLOR_BIT} specifies the color aspect.
  • *
  • {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT} specifies the depth aspect.
  • *
  • {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT} specifies the stencil aspect.
  • *
  • {@link #VK_IMAGE_ASPECT_METADATA_BIT IMAGE_ASPECT_METADATA_BIT} specifies the metadata aspect, used for sparse resource operations.
  • *
  • {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} specifies plane 0 of a multi-planar image format.
  • *
  • {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} specifies plane 1 of a multi-planar image format.
  • *
  • {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} specifies plane 2 of a multi-planar image format.
  • *
  • {@link EXTImageDrmFormatModifier#VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT} specifies memory plane 0.
  • *
  • {@link EXTImageDrmFormatModifier#VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT} specifies memory plane 1.
  • *
  • {@link EXTImageDrmFormatModifier#VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT} specifies memory plane 2.
  • *
  • {@link EXTImageDrmFormatModifier#VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT} specifies memory plane 3.
  • *
* *
See Also
* *

{@link VkBindImagePlaneMemoryInfo}, {@link VkDeviceImageMemoryRequirementsKHR}, {@link VkImagePlaneMemoryRequirementsInfo}

*/ public static final int VK_IMAGE_ASPECT_COLOR_BIT = 0x1, VK_IMAGE_ASPECT_DEPTH_BIT = 0x2, VK_IMAGE_ASPECT_STENCIL_BIT = 0x4, VK_IMAGE_ASPECT_METADATA_BIT = 0x8; /** * VkObjectType - Specify an enumeration to track object handle types * *
Description
* *
{@code VkObjectType} and Vulkan Handle Relationship
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
{@code VkObjectType}Vulkan Handle Type
{@link #VK_OBJECT_TYPE_UNKNOWN OBJECT_TYPE_UNKNOWN}Unknown/Undefined Handle
{@link #VK_OBJECT_TYPE_INSTANCE OBJECT_TYPE_INSTANCE}{@code VkInstance}
{@link #VK_OBJECT_TYPE_PHYSICAL_DEVICE OBJECT_TYPE_PHYSICAL_DEVICE}{@code VkPhysicalDevice}
{@link #VK_OBJECT_TYPE_DEVICE OBJECT_TYPE_DEVICE}{@code VkDevice}
{@link #VK_OBJECT_TYPE_QUEUE OBJECT_TYPE_QUEUE}{@code VkQueue}
{@link #VK_OBJECT_TYPE_SEMAPHORE OBJECT_TYPE_SEMAPHORE}{@code VkSemaphore}
{@link #VK_OBJECT_TYPE_COMMAND_BUFFER OBJECT_TYPE_COMMAND_BUFFER}{@code VkCommandBuffer}
{@link #VK_OBJECT_TYPE_FENCE OBJECT_TYPE_FENCE}{@code VkFence}
{@link #VK_OBJECT_TYPE_DEVICE_MEMORY OBJECT_TYPE_DEVICE_MEMORY}{@code VkDeviceMemory}
{@link #VK_OBJECT_TYPE_BUFFER OBJECT_TYPE_BUFFER}{@code VkBuffer}
{@link #VK_OBJECT_TYPE_IMAGE OBJECT_TYPE_IMAGE}{@code VkImage}
{@link #VK_OBJECT_TYPE_EVENT OBJECT_TYPE_EVENT}{@code VkEvent}
{@link #VK_OBJECT_TYPE_QUERY_POOL OBJECT_TYPE_QUERY_POOL}{@code VkQueryPool}
{@link #VK_OBJECT_TYPE_BUFFER_VIEW OBJECT_TYPE_BUFFER_VIEW}{@code VkBufferView}
{@link #VK_OBJECT_TYPE_IMAGE_VIEW OBJECT_TYPE_IMAGE_VIEW}{@code VkImageView}
{@link #VK_OBJECT_TYPE_SHADER_MODULE OBJECT_TYPE_SHADER_MODULE}{@code VkShaderModule}
{@link #VK_OBJECT_TYPE_PIPELINE_CACHE OBJECT_TYPE_PIPELINE_CACHE}{@code VkPipelineCache}
{@link #VK_OBJECT_TYPE_PIPELINE_LAYOUT OBJECT_TYPE_PIPELINE_LAYOUT}{@code VkPipelineLayout}
{@link #VK_OBJECT_TYPE_RENDER_PASS OBJECT_TYPE_RENDER_PASS}{@code VkRenderPass}
{@link #VK_OBJECT_TYPE_PIPELINE OBJECT_TYPE_PIPELINE}{@code VkPipeline}
{@link #VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT}{@code VkDescriptorSetLayout}
{@link #VK_OBJECT_TYPE_SAMPLER OBJECT_TYPE_SAMPLER}{@code VkSampler}
{@link #VK_OBJECT_TYPE_DESCRIPTOR_POOL OBJECT_TYPE_DESCRIPTOR_POOL}{@code VkDescriptorPool}
{@link #VK_OBJECT_TYPE_DESCRIPTOR_SET OBJECT_TYPE_DESCRIPTOR_SET}{@code VkDescriptorSet}
{@link #VK_OBJECT_TYPE_FRAMEBUFFER OBJECT_TYPE_FRAMEBUFFER}{@code VkFramebuffer}
{@link #VK_OBJECT_TYPE_COMMAND_POOL OBJECT_TYPE_COMMAND_POOL}{@code VkCommandPool}
{@link VK11#VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION}{@code VkSamplerYcbcrConversion}
{@link VK11#VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE}{@code VkDescriptorUpdateTemplate}
{@link KHRSurface#VK_OBJECT_TYPE_SURFACE_KHR OBJECT_TYPE_SURFACE_KHR}{@code VkSurfaceKHR}
{@link KHRSwapchain#VK_OBJECT_TYPE_SWAPCHAIN_KHR OBJECT_TYPE_SWAPCHAIN_KHR}{@code VkSwapchainKHR}
{@link KHRDisplay#VK_OBJECT_TYPE_DISPLAY_KHR OBJECT_TYPE_DISPLAY_KHR}{@code VkDisplayKHR}
{@link KHRDisplay#VK_OBJECT_TYPE_DISPLAY_MODE_KHR OBJECT_TYPE_DISPLAY_MODE_KHR}{@code VkDisplayModeKHR}
{@link EXTDebugReport#VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT}{@code VkDebugReportCallbackEXT}
{@link NVDeviceGeneratedCommands#VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV}{@code VkIndirectCommandsLayoutNV}
{@link EXTDebugUtils#VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT}{@code VkDebugUtilsMessengerEXT}
{@link EXTValidationCache#VK_OBJECT_TYPE_VALIDATION_CACHE_EXT OBJECT_TYPE_VALIDATION_CACHE_EXT}{@code VkValidationCacheEXT}
{@link NVRayTracing#VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV OBJECT_TYPE_ACCELERATION_STRUCTURE_NV}{@code VkAccelerationStructureNV}
{@link KHRAccelerationStructure#VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR}{@code VkAccelerationStructureKHR}
{@link INTELPerformanceQuery#VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL}{@code VkPerformanceConfigurationINTEL}
{@link KHRDeferredHostOperations#VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR OBJECT_TYPE_DEFERRED_OPERATION_KHR}{@code VkDeferredOperationKHR}
{@link EXTPrivateData#VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT}{@code VkPrivateDataSlotEXT}
* *
See Also
* *

{@link VkDebugUtilsObjectNameInfoEXT}, {@link VkDebugUtilsObjectTagInfoEXT}, {@link VkDeviceMemoryReportCallbackDataEXT}, {@link EXTPrivateData#vkGetPrivateDataEXT GetPrivateDataEXT}, {@link EXTPrivateData#vkSetPrivateDataEXT SetPrivateDataEXT}

*/ public static final int VK_OBJECT_TYPE_UNKNOWN = 0, VK_OBJECT_TYPE_INSTANCE = 1, VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2, VK_OBJECT_TYPE_DEVICE = 3, VK_OBJECT_TYPE_QUEUE = 4, VK_OBJECT_TYPE_SEMAPHORE = 5, VK_OBJECT_TYPE_COMMAND_BUFFER = 6, VK_OBJECT_TYPE_FENCE = 7, VK_OBJECT_TYPE_DEVICE_MEMORY = 8, VK_OBJECT_TYPE_BUFFER = 9, VK_OBJECT_TYPE_IMAGE = 10, VK_OBJECT_TYPE_EVENT = 11, VK_OBJECT_TYPE_QUERY_POOL = 12, VK_OBJECT_TYPE_BUFFER_VIEW = 13, VK_OBJECT_TYPE_IMAGE_VIEW = 14, VK_OBJECT_TYPE_SHADER_MODULE = 15, VK_OBJECT_TYPE_PIPELINE_CACHE = 16, VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17, VK_OBJECT_TYPE_RENDER_PASS = 18, VK_OBJECT_TYPE_PIPELINE = 19, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20, VK_OBJECT_TYPE_SAMPLER = 21, VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22, VK_OBJECT_TYPE_DESCRIPTOR_SET = 23, VK_OBJECT_TYPE_FRAMEBUFFER = 24, VK_OBJECT_TYPE_COMMAND_POOL = 25; /** * VkPipelineCacheHeaderVersion - Encode pipeline cache version * *
Description
* *
    *
  • {@link #VK_PIPELINE_CACHE_HEADER_VERSION_ONE PIPELINE_CACHE_HEADER_VERSION_ONE} specifies version one of the pipeline cache.
  • *
* *
See Also
* *

{@link VkPipelineCacheHeaderVersionOne}, {@link #vkCreatePipelineCache CreatePipelineCache}, {@link #vkGetPipelineCacheData GetPipelineCacheData}

*/ public static final int VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1; /** * VkVendorId - Khronos vendor IDs * *
Description
* *
Note
* *

Khronos vendor IDs may be allocated by vendors at any time. Only the latest canonical versions of this Specification, of the corresponding {@code vk.xml} API Registry, and of the corresponding {@code vulkan_core.h} header file must contain all reserved Khronos vendor IDs.

* *

Only Khronos vendor IDs are given symbolic names at present. PCI vendor IDs returned by the implementation can be looked up in the PCI-SIG database.

*
* *
Enum values:
* *
    *
  • {@link #VK_VENDOR_ID_VIV VENDOR_ID_VIV}
  • *
  • {@link #VK_VENDOR_ID_VSI VENDOR_ID_VSI}
  • *
  • {@link #VK_VENDOR_ID_KAZAN VENDOR_ID_KAZAN}
  • *
  • {@link #VK_VENDOR_ID_CODEPLAY VENDOR_ID_CODEPLAY}
  • *
  • {@link #VK_VENDOR_ID_MESA VENDOR_ID_MESA}
  • *
  • {@link #VK_VENDOR_ID_POCL VENDOR_ID_POCL}
  • *
*/ public static final int VK_VENDOR_ID_VIV = 0x10001, VK_VENDOR_ID_VSI = 0x10002, VK_VENDOR_ID_KAZAN = 0x10003, VK_VENDOR_ID_CODEPLAY = 0x10004, VK_VENDOR_ID_MESA = 0x10005, VK_VENDOR_ID_POCL = 0x10006; /** * VkSystemAllocationScope - Allocation scope * *
Description
* *
    *
  • {@link #VK_SYSTEM_ALLOCATION_SCOPE_COMMAND SYSTEM_ALLOCATION_SCOPE_COMMAND} specifies that the allocation is scoped to the duration of the Vulkan command.
  • *
  • {@link #VK_SYSTEM_ALLOCATION_SCOPE_OBJECT SYSTEM_ALLOCATION_SCOPE_OBJECT} specifies that the allocation is scoped to the lifetime of the Vulkan object that is being created or used.
  • *
  • {@link #VK_SYSTEM_ALLOCATION_SCOPE_CACHE SYSTEM_ALLOCATION_SCOPE_CACHE} specifies that the allocation is scoped to the lifetime of a {@code VkPipelineCache} or {@code VkValidationCacheEXT} object.
  • *
  • {@link #VK_SYSTEM_ALLOCATION_SCOPE_DEVICE SYSTEM_ALLOCATION_SCOPE_DEVICE} specifies that the allocation is scoped to the lifetime of the Vulkan device.
  • *
  • {@link #VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE SYSTEM_ALLOCATION_SCOPE_INSTANCE} specifies that the allocation is scoped to the lifetime of the Vulkan instance.
  • *
* *

Most Vulkan commands operate on a single object, or there is a sole object that is being created or manipulated. When an allocation uses an allocation scope of {@link #VK_SYSTEM_ALLOCATION_SCOPE_OBJECT SYSTEM_ALLOCATION_SCOPE_OBJECT} or {@link #VK_SYSTEM_ALLOCATION_SCOPE_CACHE SYSTEM_ALLOCATION_SCOPE_CACHE}, the allocation is scoped to the object being created or manipulated.

* *

When an implementation requires host memory, it will make callbacks to the application using the most specific allocator and allocation scope available:

* *
    *
  • If an allocation is scoped to the duration of a command, the allocator will use the {@link #VK_SYSTEM_ALLOCATION_SCOPE_COMMAND SYSTEM_ALLOCATION_SCOPE_COMMAND} allocation scope. The most specific allocator available is used: if the object being created or manipulated has an allocator, that object’s allocator will be used, else if the parent {@code VkDevice} has an allocator it will be used, else if the parent {@code VkInstance} has an allocator it will be used. Else,
  • *
  • If an allocation is associated with a {@code VkValidationCacheEXT} or {@code VkPipelineCache} object, the allocator will use the {@link #VK_SYSTEM_ALLOCATION_SCOPE_CACHE SYSTEM_ALLOCATION_SCOPE_CACHE} allocation scope. The most specific allocator available is used (cache, else device, else instance). Else,
  • *
  • If an allocation is scoped to the lifetime of an object, that object is being created or manipulated by the command, and that object’s type is not {@code VkDevice} or {@code VkInstance}, the allocator will use an allocation scope of {@link #VK_SYSTEM_ALLOCATION_SCOPE_OBJECT SYSTEM_ALLOCATION_SCOPE_OBJECT}. The most specific allocator available is used (object, else device, else instance). Else,
  • *
  • If an allocation is scoped to the lifetime of a device, the allocator will use an allocation scope of {@link #VK_SYSTEM_ALLOCATION_SCOPE_DEVICE SYSTEM_ALLOCATION_SCOPE_DEVICE}. The most specific allocator available is used (device, else instance). Else,
  • *
  • If the allocation is scoped to the lifetime of an instance and the instance has an allocator, its allocator will be used with an allocation scope of {@link #VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE SYSTEM_ALLOCATION_SCOPE_INSTANCE}.
  • *
  • Otherwise an implementation will allocate memory through an alternative mechanism that is unspecified.
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

*/ public static final int VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1, VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4; /** * VkInternalAllocationType - Allocation type * *
Description
* *
    *
  • {@link #VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE INTERNAL_ALLOCATION_TYPE_EXECUTABLE} specifies that the allocation is intended for execution by the host.
  • *
* *
See Also
* *

{@link VkInternalAllocationNotification}, {@link VkInternalFreeNotification}

*/ public static final int VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0; /** * VkFormat - Available image formats * *
Description
* *
    *
  • {@link #VK_FORMAT_UNDEFINED FORMAT_UNDEFINED} specifies that the format is not specified.
  • *
  • {@link #VK_FORMAT_R4G4_UNORM_PACK8 FORMAT_R4G4_UNORM_PACK8} specifies a two-component, 8-bit packed unsigned normalized format that has a 4-bit R component in bits 4..7, and a 4-bit G component in bits 0..3.
  • *
  • {@link #VK_FORMAT_R4G4B4A4_UNORM_PACK16 FORMAT_R4G4B4A4_UNORM_PACK16} specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit R component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit B component in bits 4..7, and a 4-bit A component in bits 0..3.
  • *
  • {@link #VK_FORMAT_B4G4R4A4_UNORM_PACK16 FORMAT_B4G4R4A4_UNORM_PACK16} specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit B component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit R component in bits 4..7, and a 4-bit A component in bits 0..3.
  • *
  • {@link EXT4444Formats#VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT FORMAT_A4R4G4B4_UNORM_PACK16_EXT} specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit A component in bits 12..15, a 4-bit R component in bits 8..11, a 4-bit G component in bits 4..7, and a 4-bit B component in bits 0..3.
  • *
  • {@link EXT4444Formats#VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT FORMAT_A4B4G4R4_UNORM_PACK16_EXT} specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit A component in bits 12..15, a 4-bit B component in bits 8..11, a 4-bit G component in bits 4..7, and a 4-bit R component in bits 0..3.
  • *
  • {@link #VK_FORMAT_R5G6B5_UNORM_PACK16 FORMAT_R5G6B5_UNORM_PACK16} specifies a three-component, 16-bit packed unsigned normalized format that has a 5-bit R component in bits 11..15, a 6-bit G component in bits 5..10, and a 5-bit B component in bits 0..4.
  • *
  • {@link #VK_FORMAT_B5G6R5_UNORM_PACK16 FORMAT_B5G6R5_UNORM_PACK16} specifies a three-component, 16-bit packed unsigned normalized format that has a 5-bit B component in bits 11..15, a 6-bit G component in bits 5..10, and a 5-bit R component in bits 0..4.
  • *
  • {@link #VK_FORMAT_R5G5B5A1_UNORM_PACK16 FORMAT_R5G5B5A1_UNORM_PACK16} specifies a four-component, 16-bit packed unsigned normalized format that has a 5-bit R component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit B component in bits 1..5, and a 1-bit A component in bit 0.
  • *
  • {@link #VK_FORMAT_B5G5R5A1_UNORM_PACK16 FORMAT_B5G5R5A1_UNORM_PACK16} specifies a four-component, 16-bit packed unsigned normalized format that has a 5-bit B component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit R component in bits 1..5, and a 1-bit A component in bit 0.
  • *
  • {@link #VK_FORMAT_A1R5G5B5_UNORM_PACK16 FORMAT_A1R5G5B5_UNORM_PACK16} specifies a four-component, 16-bit packed unsigned normalized format that has a 1-bit A component in bit 15, a 5-bit R component in bits 10..14, a 5-bit G component in bits 5..9, and a 5-bit B component in bits 0..4.
  • *
  • {@link #VK_FORMAT_R8_UNORM FORMAT_R8_UNORM} specifies a one-component, 8-bit unsigned normalized format that has a single 8-bit R component.
  • *
  • {@link #VK_FORMAT_R8_SNORM FORMAT_R8_SNORM} specifies a one-component, 8-bit signed normalized format that has a single 8-bit R component.
  • *
  • {@link #VK_FORMAT_R8_USCALED FORMAT_R8_USCALED} specifies a one-component, 8-bit unsigned scaled integer format that has a single 8-bit R component.
  • *
  • {@link #VK_FORMAT_R8_SSCALED FORMAT_R8_SSCALED} specifies a one-component, 8-bit signed scaled integer format that has a single 8-bit R component.
  • *
  • {@link #VK_FORMAT_R8_UINT FORMAT_R8_UINT} specifies a one-component, 8-bit unsigned integer format that has a single 8-bit R component.
  • *
  • {@link #VK_FORMAT_R8_SINT FORMAT_R8_SINT} specifies a one-component, 8-bit signed integer format that has a single 8-bit R component.
  • *
  • {@link #VK_FORMAT_R8_SRGB FORMAT_R8_SRGB} specifies a one-component, 8-bit unsigned normalized format that has a single 8-bit R component stored with sRGB nonlinear encoding.
  • *
  • {@link #VK_FORMAT_R8G8_UNORM FORMAT_R8G8_UNORM} specifies a two-component, 16-bit unsigned normalized format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.
  • *
  • {@link #VK_FORMAT_R8G8_SNORM FORMAT_R8G8_SNORM} specifies a two-component, 16-bit signed normalized format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.
  • *
  • {@link #VK_FORMAT_R8G8_USCALED FORMAT_R8G8_USCALED} specifies a two-component, 16-bit unsigned scaled integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.
  • *
  • {@link #VK_FORMAT_R8G8_SSCALED FORMAT_R8G8_SSCALED} specifies a two-component, 16-bit signed scaled integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.
  • *
  • {@link #VK_FORMAT_R8G8_UINT FORMAT_R8G8_UINT} specifies a two-component, 16-bit unsigned integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.
  • *
  • {@link #VK_FORMAT_R8G8_SINT FORMAT_R8G8_SINT} specifies a two-component, 16-bit signed integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.
  • *
  • {@link #VK_FORMAT_R8G8_SRGB FORMAT_R8G8_SRGB} specifies a two-component, 16-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, and an 8-bit G component stored with sRGB nonlinear encoding in byte 1.
  • *
  • {@link #VK_FORMAT_R8G8B8_UNORM FORMAT_R8G8B8_UNORM} specifies a three-component, 24-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
  • *
  • {@link #VK_FORMAT_R8G8B8_SNORM FORMAT_R8G8B8_SNORM} specifies a three-component, 24-bit signed normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
  • *
  • {@link #VK_FORMAT_R8G8B8_USCALED FORMAT_R8G8B8_USCALED} specifies a three-component, 24-bit unsigned scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
  • *
  • {@link #VK_FORMAT_R8G8B8_SSCALED FORMAT_R8G8B8_SSCALED} specifies a three-component, 24-bit signed scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
  • *
  • {@link #VK_FORMAT_R8G8B8_UINT FORMAT_R8G8B8_UINT} specifies a three-component, 24-bit unsigned integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
  • *
  • {@link #VK_FORMAT_R8G8B8_SINT FORMAT_R8G8B8_SINT} specifies a three-component, 24-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.
  • *
  • {@link #VK_FORMAT_R8G8B8_SRGB FORMAT_R8G8B8_SRGB} specifies a three-component, 24-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and an 8-bit B component stored with sRGB nonlinear encoding in byte 2.
  • *
  • {@link #VK_FORMAT_B8G8R8_UNORM FORMAT_B8G8R8_UNORM} specifies a three-component, 24-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.
  • *
  • {@link #VK_FORMAT_B8G8R8_SNORM FORMAT_B8G8R8_SNORM} specifies a three-component, 24-bit signed normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.
  • *
  • {@link #VK_FORMAT_B8G8R8_USCALED FORMAT_B8G8R8_USCALED} specifies a three-component, 24-bit unsigned scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.
  • *
  • {@link #VK_FORMAT_B8G8R8_SSCALED FORMAT_B8G8R8_SSCALED} specifies a three-component, 24-bit signed scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.
  • *
  • {@link #VK_FORMAT_B8G8R8_UINT FORMAT_B8G8R8_UINT} specifies a three-component, 24-bit unsigned integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.
  • *
  • {@link #VK_FORMAT_B8G8R8_SINT FORMAT_B8G8R8_SINT} specifies a three-component, 24-bit signed integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.
  • *
  • {@link #VK_FORMAT_B8G8R8_SRGB FORMAT_B8G8R8_SRGB} specifies a three-component, 24-bit unsigned normalized format that has an 8-bit B component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and an 8-bit R component stored with sRGB nonlinear encoding in byte 2.
  • *
  • {@link #VK_FORMAT_R8G8B8A8_UNORM FORMAT_R8G8B8A8_UNORM} specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_R8G8B8A8_SNORM FORMAT_R8G8B8A8_SNORM} specifies a four-component, 32-bit signed normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_R8G8B8A8_USCALED FORMAT_R8G8B8A8_USCALED} specifies a four-component, 32-bit unsigned scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_R8G8B8A8_SSCALED FORMAT_R8G8B8A8_SSCALED} specifies a four-component, 32-bit signed scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_R8G8B8A8_UINT FORMAT_R8G8B8A8_UINT} specifies a four-component, 32-bit unsigned integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_R8G8B8A8_SINT FORMAT_R8G8B8A8_SINT} specifies a four-component, 32-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_R8G8B8A8_SRGB FORMAT_R8G8B8A8_SRGB} specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, an 8-bit B component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_B8G8R8A8_UNORM FORMAT_B8G8R8A8_UNORM} specifies a four-component, 32-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_B8G8R8A8_SNORM FORMAT_B8G8R8A8_SNORM} specifies a four-component, 32-bit signed normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_B8G8R8A8_USCALED FORMAT_B8G8R8A8_USCALED} specifies a four-component, 32-bit unsigned scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_B8G8R8A8_SSCALED FORMAT_B8G8R8A8_SSCALED} specifies a four-component, 32-bit signed scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_B8G8R8A8_UINT FORMAT_B8G8R8A8_UINT} specifies a four-component, 32-bit unsigned integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_B8G8R8A8_SINT FORMAT_B8G8R8A8_SINT} specifies a four-component, 32-bit signed integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_B8G8R8A8_SRGB FORMAT_B8G8R8A8_SRGB} specifies a four-component, 32-bit unsigned normalized format that has an 8-bit B component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, an 8-bit R component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A component in byte 3.
  • *
  • {@link #VK_FORMAT_A8B8G8R8_UNORM_PACK32 FORMAT_A8B8G8R8_UNORM_PACK32} specifies a four-component, 32-bit packed unsigned normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.
  • *
  • {@link #VK_FORMAT_A8B8G8R8_SNORM_PACK32 FORMAT_A8B8G8R8_SNORM_PACK32} specifies a four-component, 32-bit packed signed normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.
  • *
  • {@link #VK_FORMAT_A8B8G8R8_USCALED_PACK32 FORMAT_A8B8G8R8_USCALED_PACK32} specifies a four-component, 32-bit packed unsigned scaled integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.
  • *
  • {@link #VK_FORMAT_A8B8G8R8_SSCALED_PACK32 FORMAT_A8B8G8R8_SSCALED_PACK32} specifies a four-component, 32-bit packed signed scaled integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.
  • *
  • {@link #VK_FORMAT_A8B8G8R8_UINT_PACK32 FORMAT_A8B8G8R8_UINT_PACK32} specifies a four-component, 32-bit packed unsigned integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.
  • *
  • {@link #VK_FORMAT_A8B8G8R8_SINT_PACK32 FORMAT_A8B8G8R8_SINT_PACK32} specifies a four-component, 32-bit packed signed integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.
  • *
  • {@link #VK_FORMAT_A8B8G8R8_SRGB_PACK32 FORMAT_A8B8G8R8_SRGB_PACK32} specifies a four-component, 32-bit packed unsigned normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component stored with sRGB nonlinear encoding in bits 16..23, an 8-bit G component stored with sRGB nonlinear encoding in bits 8..15, and an 8-bit R component stored with sRGB nonlinear encoding in bits 0..7.
  • *
  • {@link #VK_FORMAT_A2R10G10B10_UNORM_PACK32 FORMAT_A2R10G10B10_UNORM_PACK32} specifies a four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2R10G10B10_SNORM_PACK32 FORMAT_A2R10G10B10_SNORM_PACK32} specifies a four-component, 32-bit packed signed normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2R10G10B10_USCALED_PACK32 FORMAT_A2R10G10B10_USCALED_PACK32} specifies a four-component, 32-bit packed unsigned scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2R10G10B10_SSCALED_PACK32 FORMAT_A2R10G10B10_SSCALED_PACK32} specifies a four-component, 32-bit packed signed scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2R10G10B10_UINT_PACK32 FORMAT_A2R10G10B10_UINT_PACK32} specifies a four-component, 32-bit packed unsigned integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2R10G10B10_SINT_PACK32 FORMAT_A2R10G10B10_SINT_PACK32} specifies a four-component, 32-bit packed signed integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2B10G10R10_UNORM_PACK32 FORMAT_A2B10G10R10_UNORM_PACK32} specifies a four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2B10G10R10_SNORM_PACK32 FORMAT_A2B10G10R10_SNORM_PACK32} specifies a four-component, 32-bit packed signed normalized format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2B10G10R10_USCALED_PACK32 FORMAT_A2B10G10R10_USCALED_PACK32} specifies a four-component, 32-bit packed unsigned scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2B10G10R10_SSCALED_PACK32 FORMAT_A2B10G10R10_SSCALED_PACK32} specifies a four-component, 32-bit packed signed scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2B10G10R10_UINT_PACK32 FORMAT_A2B10G10R10_UINT_PACK32} specifies a four-component, 32-bit packed unsigned integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.
  • *
  • {@link #VK_FORMAT_A2B10G10R10_SINT_PACK32 FORMAT_A2B10G10R10_SINT_PACK32} specifies a four-component, 32-bit packed signed integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.
  • *
  • {@link #VK_FORMAT_R16_UNORM FORMAT_R16_UNORM} specifies a one-component, 16-bit unsigned normalized format that has a single 16-bit R component.
  • *
  • {@link #VK_FORMAT_R16_SNORM FORMAT_R16_SNORM} specifies a one-component, 16-bit signed normalized format that has a single 16-bit R component.
  • *
  • {@link #VK_FORMAT_R16_USCALED FORMAT_R16_USCALED} specifies a one-component, 16-bit unsigned scaled integer format that has a single 16-bit R component.
  • *
  • {@link #VK_FORMAT_R16_SSCALED FORMAT_R16_SSCALED} specifies a one-component, 16-bit signed scaled integer format that has a single 16-bit R component.
  • *
  • {@link #VK_FORMAT_R16_UINT FORMAT_R16_UINT} specifies a one-component, 16-bit unsigned integer format that has a single 16-bit R component.
  • *
  • {@link #VK_FORMAT_R16_SINT FORMAT_R16_SINT} specifies a one-component, 16-bit signed integer format that has a single 16-bit R component.
  • *
  • {@link #VK_FORMAT_R16_SFLOAT FORMAT_R16_SFLOAT} specifies a one-component, 16-bit signed floating-point format that has a single 16-bit R component.
  • *
  • {@link #VK_FORMAT_R16G16_UNORM FORMAT_R16G16_UNORM} specifies a two-component, 32-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.
  • *
  • {@link #VK_FORMAT_R16G16_SNORM FORMAT_R16G16_SNORM} specifies a two-component, 32-bit signed normalized format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.
  • *
  • {@link #VK_FORMAT_R16G16_USCALED FORMAT_R16G16_USCALED} specifies a two-component, 32-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.
  • *
  • {@link #VK_FORMAT_R16G16_SSCALED FORMAT_R16G16_SSCALED} specifies a two-component, 32-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.
  • *
  • {@link #VK_FORMAT_R16G16_UINT FORMAT_R16G16_UINT} specifies a two-component, 32-bit unsigned integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.
  • *
  • {@link #VK_FORMAT_R16G16_SINT FORMAT_R16G16_SINT} specifies a two-component, 32-bit signed integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.
  • *
  • {@link #VK_FORMAT_R16G16_SFLOAT FORMAT_R16G16_SFLOAT} specifies a two-component, 32-bit signed floating-point format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.
  • *
  • {@link #VK_FORMAT_R16G16B16_UNORM FORMAT_R16G16B16_UNORM} specifies a three-component, 48-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.
  • *
  • {@link #VK_FORMAT_R16G16B16_SNORM FORMAT_R16G16B16_SNORM} specifies a three-component, 48-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.
  • *
  • {@link #VK_FORMAT_R16G16B16_USCALED FORMAT_R16G16B16_USCALED} specifies a three-component, 48-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.
  • *
  • {@link #VK_FORMAT_R16G16B16_SSCALED FORMAT_R16G16B16_SSCALED} specifies a three-component, 48-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.
  • *
  • {@link #VK_FORMAT_R16G16B16_UINT FORMAT_R16G16B16_UINT} specifies a three-component, 48-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.
  • *
  • {@link #VK_FORMAT_R16G16B16_SINT FORMAT_R16G16B16_SINT} specifies a three-component, 48-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.
  • *
  • {@link #VK_FORMAT_R16G16B16_SFLOAT FORMAT_R16G16B16_SFLOAT} specifies a three-component, 48-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.
  • *
  • {@link #VK_FORMAT_R16G16B16A16_UNORM FORMAT_R16G16B16A16_UNORM} specifies a four-component, 64-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.
  • *
  • {@link #VK_FORMAT_R16G16B16A16_SNORM FORMAT_R16G16B16A16_SNORM} specifies a four-component, 64-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.
  • *
  • {@link #VK_FORMAT_R16G16B16A16_USCALED FORMAT_R16G16B16A16_USCALED} specifies a four-component, 64-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.
  • *
  • {@link #VK_FORMAT_R16G16B16A16_SSCALED FORMAT_R16G16B16A16_SSCALED} specifies a four-component, 64-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.
  • *
  • {@link #VK_FORMAT_R16G16B16A16_UINT FORMAT_R16G16B16A16_UINT} specifies a four-component, 64-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.
  • *
  • {@link #VK_FORMAT_R16G16B16A16_SINT FORMAT_R16G16B16A16_SINT} specifies a four-component, 64-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.
  • *
  • {@link #VK_FORMAT_R16G16B16A16_SFLOAT FORMAT_R16G16B16A16_SFLOAT} specifies a four-component, 64-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.
  • *
  • {@link #VK_FORMAT_R32_UINT FORMAT_R32_UINT} specifies a one-component, 32-bit unsigned integer format that has a single 32-bit R component.
  • *
  • {@link #VK_FORMAT_R32_SINT FORMAT_R32_SINT} specifies a one-component, 32-bit signed integer format that has a single 32-bit R component.
  • *
  • {@link #VK_FORMAT_R32_SFLOAT FORMAT_R32_SFLOAT} specifies a one-component, 32-bit signed floating-point format that has a single 32-bit R component.
  • *
  • {@link #VK_FORMAT_R32G32_UINT FORMAT_R32G32_UINT} specifies a two-component, 64-bit unsigned integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7.
  • *
  • {@link #VK_FORMAT_R32G32_SINT FORMAT_R32G32_SINT} specifies a two-component, 64-bit signed integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7.
  • *
  • {@link #VK_FORMAT_R32G32_SFLOAT FORMAT_R32G32_SFLOAT} specifies a two-component, 64-bit signed floating-point format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7.
  • *
  • {@link #VK_FORMAT_R32G32B32_UINT FORMAT_R32G32B32_UINT} specifies a three-component, 96-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11.
  • *
  • {@link #VK_FORMAT_R32G32B32_SINT FORMAT_R32G32B32_SINT} specifies a three-component, 96-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11.
  • *
  • {@link #VK_FORMAT_R32G32B32_SFLOAT FORMAT_R32G32B32_SFLOAT} specifies a three-component, 96-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11.
  • *
  • {@link #VK_FORMAT_R32G32B32A32_UINT FORMAT_R32G32B32A32_UINT} specifies a four-component, 128-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15.
  • *
  • {@link #VK_FORMAT_R32G32B32A32_SINT FORMAT_R32G32B32A32_SINT} specifies a four-component, 128-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15.
  • *
  • {@link #VK_FORMAT_R32G32B32A32_SFLOAT FORMAT_R32G32B32A32_SFLOAT} specifies a four-component, 128-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15.
  • *
  • {@link #VK_FORMAT_R64_UINT FORMAT_R64_UINT} specifies a one-component, 64-bit unsigned integer format that has a single 64-bit R component.
  • *
  • {@link #VK_FORMAT_R64_SINT FORMAT_R64_SINT} specifies a one-component, 64-bit signed integer format that has a single 64-bit R component.
  • *
  • {@link #VK_FORMAT_R64_SFLOAT FORMAT_R64_SFLOAT} specifies a one-component, 64-bit signed floating-point format that has a single 64-bit R component.
  • *
  • {@link #VK_FORMAT_R64G64_UINT FORMAT_R64G64_UINT} specifies a two-component, 128-bit unsigned integer format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15.
  • *
  • {@link #VK_FORMAT_R64G64_SINT FORMAT_R64G64_SINT} specifies a two-component, 128-bit signed integer format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15.
  • *
  • {@link #VK_FORMAT_R64G64_SFLOAT FORMAT_R64G64_SFLOAT} specifies a two-component, 128-bit signed floating-point format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15.
  • *
  • {@link #VK_FORMAT_R64G64B64_UINT FORMAT_R64G64B64_UINT} specifies a three-component, 192-bit unsigned integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23.
  • *
  • {@link #VK_FORMAT_R64G64B64_SINT FORMAT_R64G64B64_SINT} specifies a three-component, 192-bit signed integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23.
  • *
  • {@link #VK_FORMAT_R64G64B64_SFLOAT FORMAT_R64G64B64_SFLOAT} specifies a three-component, 192-bit signed floating-point format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23.
  • *
  • {@link #VK_FORMAT_R64G64B64A64_UINT FORMAT_R64G64B64A64_UINT} specifies a four-component, 256-bit unsigned integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31.
  • *
  • {@link #VK_FORMAT_R64G64B64A64_SINT FORMAT_R64G64B64A64_SINT} specifies a four-component, 256-bit signed integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31.
  • *
  • {@link #VK_FORMAT_R64G64B64A64_SFLOAT FORMAT_R64G64B64A64_SFLOAT} specifies a four-component, 256-bit signed floating-point format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31.
  • *
  • {@link #VK_FORMAT_B10G11R11_UFLOAT_PACK32 FORMAT_B10G11R11_UFLOAT_PACK32} specifies a three-component, 32-bit packed unsigned floating-point format that has a 10-bit B component in bits 22..31, an 11-bit G component in bits 11..21, an 11-bit R component in bits 0..10. See Unsigned 10-Bit Floating-Point Numbers and Unsigned 11-Bit Floating-Point Numbers.
  • *
  • {@link #VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 FORMAT_E5B9G9R9_UFLOAT_PACK32} specifies a three-component, 32-bit packed unsigned floating-point format that has a 5-bit shared exponent in bits 27..31, a 9-bit B component mantissa in bits 18..26, a 9-bit G component mantissa in bits 9..17, and a 9-bit R component mantissa in bits 0..8.
  • *
  • {@link #VK_FORMAT_D16_UNORM FORMAT_D16_UNORM} specifies a one-component, 16-bit unsigned normalized format that has a single 16-bit depth component.
  • *
  • {@link #VK_FORMAT_X8_D24_UNORM_PACK32 FORMAT_X8_D24_UNORM_PACK32} specifies a two-component, 32-bit format that has 24 unsigned normalized bits in the depth component and, optionally, 8 bits that are unused.
  • *
  • {@link #VK_FORMAT_D32_SFLOAT FORMAT_D32_SFLOAT} specifies a one-component, 32-bit signed floating-point format that has 32 bits in the depth component.
  • *
  • {@link #VK_FORMAT_S8_UINT FORMAT_S8_UINT} specifies a one-component, 8-bit unsigned integer format that has 8 bits in the stencil component.
  • *
  • {@link #VK_FORMAT_D16_UNORM_S8_UINT FORMAT_D16_UNORM_S8_UINT} specifies a two-component, 24-bit format that has 16 unsigned normalized bits in the depth component and 8 unsigned integer bits in the stencil component.
  • *
  • {@link #VK_FORMAT_D24_UNORM_S8_UINT FORMAT_D24_UNORM_S8_UINT} specifies a two-component, 32-bit packed format that has 8 unsigned integer bits in the stencil component, and 24 unsigned normalized bits in the depth component.
  • *
  • {@link #VK_FORMAT_D32_SFLOAT_S8_UINT FORMAT_D32_SFLOAT_S8_UINT} specifies a two-component format that has 32 signed float bits in the depth component and 8 unsigned integer bits in the stencil component. There are optionally 24 bits that are unused.
  • *
  • {@link #VK_FORMAT_BC1_RGB_UNORM_BLOCK FORMAT_BC1_RGB_UNORM_BLOCK} specifies a three-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data. This format has no alpha and is considered opaque.
  • *
  • {@link #VK_FORMAT_BC1_RGB_SRGB_BLOCK FORMAT_BC1_RGB_SRGB_BLOCK} specifies a three-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding. This format has no alpha and is considered opaque.
  • *
  • {@link #VK_FORMAT_BC1_RGBA_UNORM_BLOCK FORMAT_BC1_RGBA_UNORM_BLOCK} specifies a four-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha.
  • *
  • {@link #VK_FORMAT_BC1_RGBA_SRGB_BLOCK FORMAT_BC1_RGBA_SRGB_BLOCK} specifies a four-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha.
  • *
  • {@link #VK_FORMAT_BC2_UNORM_BLOCK FORMAT_BC2_UNORM_BLOCK} specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.
  • *
  • {@link #VK_FORMAT_BC2_SRGB_BLOCK FORMAT_BC2_SRGB_BLOCK} specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding.
  • *
  • {@link #VK_FORMAT_BC3_UNORM_BLOCK FORMAT_BC3_UNORM_BLOCK} specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.
  • *
  • {@link #VK_FORMAT_BC3_SRGB_BLOCK FORMAT_BC3_SRGB_BLOCK} specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding.
  • *
  • {@link #VK_FORMAT_BC4_UNORM_BLOCK FORMAT_BC4_UNORM_BLOCK} specifies a one-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized red texel data.
  • *
  • {@link #VK_FORMAT_BC4_SNORM_BLOCK FORMAT_BC4_SNORM_BLOCK} specifies a one-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of signed normalized red texel data.
  • *
  • {@link #VK_FORMAT_BC5_UNORM_BLOCK FORMAT_BC5_UNORM_BLOCK} specifies a two-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values.
  • *
  • {@link #VK_FORMAT_BC5_SNORM_BLOCK FORMAT_BC5_SNORM_BLOCK} specifies a two-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values.
  • *
  • {@link #VK_FORMAT_BC6H_UFLOAT_BLOCK FORMAT_BC6H_UFLOAT_BLOCK} specifies a three-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned floating-point RGB texel data.
  • *
  • {@link #VK_FORMAT_BC6H_SFLOAT_BLOCK FORMAT_BC6H_SFLOAT_BLOCK} specifies a three-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed floating-point RGB texel data.
  • *
  • {@link #VK_FORMAT_BC7_UNORM_BLOCK FORMAT_BC7_UNORM_BLOCK} specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_BC7_SRGB_BLOCK FORMAT_BC7_SRGB_BLOCK} specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link #VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK FORMAT_ETC2_R8G8B8_UNORM_BLOCK} specifies a three-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data. This format has no alpha and is considered opaque.
  • *
  • {@link #VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK FORMAT_ETC2_R8G8B8_SRGB_BLOCK} specifies a three-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding. This format has no alpha and is considered opaque.
  • *
  • {@link #VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK} specifies a four-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha.
  • *
  • {@link #VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK} specifies a four-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha.
  • *
  • {@link #VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK} specifies a four-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.
  • *
  • {@link #VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK} specifies a four-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding applied.
  • *
  • {@link #VK_FORMAT_EAC_R11_UNORM_BLOCK FORMAT_EAC_R11_UNORM_BLOCK} specifies a one-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized red texel data.
  • *
  • {@link #VK_FORMAT_EAC_R11_SNORM_BLOCK FORMAT_EAC_R11_SNORM_BLOCK} specifies a one-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of signed normalized red texel data.
  • *
  • {@link #VK_FORMAT_EAC_R11G11_UNORM_BLOCK FORMAT_EAC_R11G11_UNORM_BLOCK} specifies a two-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values.
  • *
  • {@link #VK_FORMAT_EAC_R11G11_SNORM_BLOCK FORMAT_EAC_R11G11_SNORM_BLOCK} specifies a two-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values.
  • *
  • {@link #VK_FORMAT_ASTC_4x4_UNORM_BLOCK FORMAT_ASTC_4x4_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_4x4_SRGB_BLOCK FORMAT_ASTC_4x4_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_5x4_UNORM_BLOCK FORMAT_ASTC_5x4_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×4 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_5x4_SRGB_BLOCK FORMAT_ASTC_5x4_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×4 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_5x5_UNORM_BLOCK FORMAT_ASTC_5x5_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×5 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_5x5_SRGB_BLOCK FORMAT_ASTC_5x5_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×5 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_6x5_UNORM_BLOCK FORMAT_ASTC_6x5_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×5 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_6x5_SRGB_BLOCK FORMAT_ASTC_6x5_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×5 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_6x6_UNORM_BLOCK FORMAT_ASTC_6x6_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×6 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_6x6_SRGB_BLOCK FORMAT_ASTC_6x6_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×6 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_8x5_UNORM_BLOCK FORMAT_ASTC_8x5_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×5 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_8x5_SRGB_BLOCK FORMAT_ASTC_8x5_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 8×5 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_8x6_UNORM_BLOCK FORMAT_ASTC_8x6_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×6 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_8x6_SRGB_BLOCK FORMAT_ASTC_8x6_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 8×6 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_8x8_UNORM_BLOCK FORMAT_ASTC_8x8_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×8 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_8x8_SRGB_BLOCK FORMAT_ASTC_8x8_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 8×8 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_10x5_UNORM_BLOCK FORMAT_ASTC_10x5_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×5 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_10x5_SRGB_BLOCK FORMAT_ASTC_10x5_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×5 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_10x6_UNORM_BLOCK FORMAT_ASTC_10x6_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×6 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_10x6_SRGB_BLOCK FORMAT_ASTC_10x6_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×6 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_10x8_UNORM_BLOCK FORMAT_ASTC_10x8_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×8 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_10x8_SRGB_BLOCK FORMAT_ASTC_10x8_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×8 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_10x10_UNORM_BLOCK FORMAT_ASTC_10x10_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×10 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_10x10_SRGB_BLOCK FORMAT_ASTC_10x10_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×10 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_12x10_UNORM_BLOCK FORMAT_ASTC_12x10_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×10 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_12x10_SRGB_BLOCK FORMAT_ASTC_12x10_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×10 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_12x12_UNORM_BLOCK FORMAT_ASTC_12x12_UNORM_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×12 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link #VK_FORMAT_ASTC_12x12_SRGB_BLOCK FORMAT_ASTC_12x12_SRGB_BLOCK} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×12 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link EXTTextureCompressionAstcHdr#VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT} specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×12 rectangle of signed floating-point RGBA texel data.
  • *
  • {@link VK11#VK_FORMAT_G8B8G8R8_422_UNORM FORMAT_G8B8G8R8_422_UNORM} specifies a four-component, 32-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has an 8-bit G component for the even i coordinate in byte 0, an 8-bit B component in byte 1, an 8-bit G component for the odd i coordinate in byte 2, and an 8-bit R component in byte 3. This format only supports images with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.
  • *
  • {@link VK11#VK_FORMAT_B8G8R8G8_422_UNORM FORMAT_B8G8R8G8_422_UNORM} specifies a four-component, 32-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has an 8-bit B component in byte 0, an 8-bit G component for the even i coordinate in byte 1, an 8-bit R component in byte 2, and an 8-bit G component for the odd i coordinate in byte 3. This format only supports images with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.
  • *
  • {@link VK11#VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM FORMAT_G8_B8_R8_3PLANE_420_UNORM} specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, an 8-bit B component in plane 1, and an 8-bit R component in plane 2. The horizontal and vertical dimensions of the R and B planes are halved relative to the image dimensions, and each R and B component is shared with the G components for which floor(iG × 0.5) = iB = iR and floor(jG × 0.5) = jB = jR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane. This format only supports images with a width and height that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G8_B8R8_2PLANE_420_UNORM FORMAT_G8_B8R8_2PLANE_420_UNORM} specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, and a two-component, 16-bit BR plane 1 consisting of an 8-bit B component in byte 0 and an 8-bit R component in byte 1. The horizontal and vertical dimensions of the BR plane are halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR and floor(jG × 0.5) = jB = jR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane. This format only supports images with a width and height that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM FORMAT_G8_B8_R8_3PLANE_422_UNORM} specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, an 8-bit B component in plane 1, and an 8-bit R component in plane 2. The horizontal dimension of the R and B plane is halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane. This format only supports images with a width that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G8_B8R8_2PLANE_422_UNORM FORMAT_G8_B8R8_2PLANE_422_UNORM} specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, and a two-component, 16-bit BR plane 1 consisting of an 8-bit B component in byte 0 and an 8-bit R component in byte 1. The horizontal dimension of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane. This format only supports images with a width that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM FORMAT_G8_B8_R8_3PLANE_444_UNORM} specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, an 8-bit B component in plane 1, and an 8-bit R component in plane 2. Each plane has the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane.
  • *
  • {@link VK11#VK_FORMAT_R10X6_UNORM_PACK16 FORMAT_R10X6_UNORM_PACK16} specifies a one-component, 16-bit unsigned normalized format that has a single 10-bit R component in the top 10 bits of a 16-bit word, with the bottom 6 bits unused.
  • *
  • {@link VK11#VK_FORMAT_R10X6G10X6_UNORM_2PACK16 FORMAT_R10X6G10X6_UNORM_2PACK16} specifies a two-component, 32-bit unsigned normalized format that has a 10-bit R component in the top 10 bits of the word in bytes 0..1, and a 10-bit G component in the top 10 bits of the word in bytes 2..3, with the bottom 6 bits of each word unused.
  • *
  • {@link VK11#VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16} specifies a four-component, 64-bit unsigned normalized format that has a 10-bit R component in the top 10 bits of the word in bytes 0..1, a 10-bit G component in the top 10 bits of the word in bytes 2..3, a 10-bit B component in the top 10 bits of the word in bytes 4..5, and a 10-bit A component in the top 10 bits of the word in bytes 6..7, with the bottom 6 bits of each word unused.
  • *
  • {@link VK11#VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16} specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 10-bit G component for the even i coordinate in the top 10 bits of the word in bytes 0..1, a 10-bit B component in the top 10 bits of the word in bytes 2..3, a 10-bit G component for the odd i coordinate in the top 10 bits of the word in bytes 4..5, and a 10-bit R component in the top 10 bits of the word in bytes 6..7, with the bottom 6 bits of each word unused. This format only supports images with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.
  • *
  • {@link VK11#VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16} specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 10-bit B component in the top 10 bits of the word in bytes 0..1, a 10-bit G component for the even i coordinate in the top 10 bits of the word in bytes 2..3, a 10-bit R component in the top 10 bits of the word in bytes 4..5, and a 10-bit G component for the odd i coordinate in the top 10 bits of the word in bytes 6..7, with the bottom 6 bits of each word unused. This format only supports images with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.
  • *
  • {@link VK11#VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, a 10-bit B component in the top 10 bits of each 16-bit word of plane 1, and a 10-bit R component in the top 10 bits of each 16-bit word of plane 2, with the bottom 6 bits of each word unused. The horizontal and vertical dimensions of the R and B planes are halved relative to the image dimensions, and each R and B component is shared with the G components for which floor(iG × 0.5) = iB = iR and floor(jG × 0.5) = jB = jR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane. This format only supports images with a width and height that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 10-bit B component in the top 10 bits of the word in bytes 0..1, and a 10-bit R component in the top 10 bits of the word in bytes 2..3, with the bottom 6 bits of each word unused. The horizontal and vertical dimensions of the BR plane are halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR and floor(jG × 0.5) = jB = jR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane. This format only supports images with a width and height that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, a 10-bit B component in the top 10 bits of each 16-bit word of plane 1, and a 10-bit R component in the top 10 bits of each 16-bit word of plane 2, with the bottom 6 bits of each word unused. The horizontal dimension of the R and B plane is halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane. This format only supports images with a width that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 10-bit B component in the top 10 bits of the word in bytes 0..1, and a 10-bit R component in the top 10 bits of the word in bytes 2..3, with the bottom 6 bits of each word unused. The horizontal dimension of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane. This format only supports images with a width that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, a 10-bit B component in the top 10 bits of each 16-bit word of plane 1, and a 10-bit R component in the top 10 bits of each 16-bit word of plane 2, with the bottom 6 bits of each word unused. Each plane has the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane.
  • *
  • {@link VK11#VK_FORMAT_R12X4_UNORM_PACK16 FORMAT_R12X4_UNORM_PACK16} specifies a one-component, 16-bit unsigned normalized format that has a single 12-bit R component in the top 12 bits of a 16-bit word, with the bottom 4 bits unused.
  • *
  • {@link VK11#VK_FORMAT_R12X4G12X4_UNORM_2PACK16 FORMAT_R12X4G12X4_UNORM_2PACK16} specifies a two-component, 32-bit unsigned normalized format that has a 12-bit R component in the top 12 bits of the word in bytes 0..1, and a 12-bit G component in the top 12 bits of the word in bytes 2..3, with the bottom 4 bits of each word unused.
  • *
  • {@link VK11#VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16} specifies a four-component, 64-bit unsigned normalized format that has a 12-bit R component in the top 12 bits of the word in bytes 0..1, a 12-bit G component in the top 12 bits of the word in bytes 2..3, a 12-bit B component in the top 12 bits of the word in bytes 4..5, and a 12-bit A component in the top 12 bits of the word in bytes 6..7, with the bottom 4 bits of each word unused.
  • *
  • {@link VK11#VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16} specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 12-bit G component for the even i coordinate in the top 12 bits of the word in bytes 0..1, a 12-bit B component in the top 12 bits of the word in bytes 2..3, a 12-bit G component for the odd i coordinate in the top 12 bits of the word in bytes 4..5, and a 12-bit R component in the top 12 bits of the word in bytes 6..7, with the bottom 4 bits of each word unused. This format only supports images with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.
  • *
  • {@link VK11#VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16} specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 12-bit B component in the top 12 bits of the word in bytes 0..1, a 12-bit G component for the even i coordinate in the top 12 bits of the word in bytes 2..3, a 12-bit R component in the top 12 bits of the word in bytes 4..5, and a 12-bit G component for the odd i coordinate in the top 12 bits of the word in bytes 6..7, with the bottom 4 bits of each word unused. This format only supports images with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.
  • *
  • {@link VK11#VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, a 12-bit B component in the top 12 bits of each 16-bit word of plane 1, and a 12-bit R component in the top 12 bits of each 16-bit word of plane 2, with the bottom 4 bits of each word unused. The horizontal and vertical dimensions of the R and B planes are halved relative to the image dimensions, and each R and B component is shared with the G components for which floor(iG × 0.5) = iB = iR and floor(jG × 0.5) = jB = jR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane. This format only supports images with a width and height that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 12-bit B component in the top 12 bits of the word in bytes 0..1, and a 12-bit R component in the top 12 bits of the word in bytes 2..3, with the bottom 4 bits of each word unused. The horizontal and vertical dimensions of the BR plane are halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR and floor(jG × 0.5) = jB = jR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane. This format only supports images with a width and height that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, a 12-bit B component in the top 12 bits of each 16-bit word of plane 1, and a 12-bit R component in the top 12 bits of each 16-bit word of plane 2, with the bottom 4 bits of each word unused. The horizontal dimension of the R and B plane is halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane. This format only supports images with a width that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 12-bit B component in the top 12 bits of the word in bytes 0..1, and a 12-bit R component in the top 12 bits of the word in bytes 2..3, with the bottom 4 bits of each word unused. The horizontal dimension of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane. This format only supports images with a width that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16} specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, a 12-bit B component in the top 12 bits of each 16-bit word of plane 1, and a 12-bit R component in the top 12 bits of each 16-bit word of plane 2, with the bottom 4 bits of each word unused. Each plane has the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane.
  • *
  • {@link VK11#VK_FORMAT_G16B16G16R16_422_UNORM FORMAT_G16B16G16R16_422_UNORM} specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 16-bit G component for the even i coordinate in the word in bytes 0..1, a 16-bit B component in the word in bytes 2..3, a 16-bit G component for the odd i coordinate in the word in bytes 4..5, and a 16-bit R component in the word in bytes 6..7. This format only supports images with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.
  • *
  • {@link VK11#VK_FORMAT_B16G16R16G16_422_UNORM FORMAT_B16G16R16G16_422_UNORM} specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 16-bit B component in the word in bytes 0..1, a 16-bit G component for the even i coordinate in the word in bytes 2..3, a 16-bit R component in the word in bytes 4..5, and a 16-bit G component for the odd i coordinate in the word in bytes 6..7. This format only supports images with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.
  • *
  • {@link VK11#VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM FORMAT_G16_B16_R16_3PLANE_420_UNORM} specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, a 16-bit B component in each 16-bit word of plane 1, and a 16-bit R component in each 16-bit word of plane 2. The horizontal and vertical dimensions of the R and B planes are halved relative to the image dimensions, and each R and B component is shared with the G components for which floor(iG × 0.5) = iB = iR and floor(jG × 0.5) = jB = jR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane. This format only supports images with a width and height that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G16_B16R16_2PLANE_420_UNORM FORMAT_G16_B16R16_2PLANE_420_UNORM} specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 16-bit B component in the word in bytes 0..1, and a 16-bit R component in the word in bytes 2..3. The horizontal and vertical dimensions of the BR plane are halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR and floor(jG × 0.5) = jB = jR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane. This format only supports images with a width and height that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM FORMAT_G16_B16_R16_3PLANE_422_UNORM} specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, a 16-bit B component in each 16-bit word of plane 1, and a 16-bit R component in each 16-bit word of plane 2. The horizontal dimension of the R and B plane is halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane. This format only supports images with a width that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G16_B16R16_2PLANE_422_UNORM FORMAT_G16_B16R16_2PLANE_422_UNORM} specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 16-bit B component in the word in bytes 0..1, and a 16-bit R component in the word in bytes 2..3. The horizontal dimension of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for which floor(iG × 0.5) = iB = iR. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane. This format only supports images with a width that is a multiple of two.
  • *
  • {@link VK11#VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM FORMAT_G16_B16_R16_3PLANE_444_UNORM} specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, a 16-bit B component in each 16-bit word of plane 1, and a 16-bit R component in each 16-bit word of plane 2. Each plane has the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the B plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} for the R plane.
  • *
  • {@link EXTYcbcr2plane444Formats#VK_FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT} specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, and a two-component, 16-bit BR plane 1 consisting of an 8-bit B component in byte 0 and an 8-bit R component in byte 1. Both planes have the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane.
  • *
  • {@link EXTYcbcr2plane444Formats#VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT} specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 10-bit B component in the top 10 bits of the word in bytes 0..1, and a 10-bit R component in the top 10 bits of the word in bytes 2..3, the bottom 6 bits of each word unused. Both planes have the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane.
  • *
  • {@link EXTYcbcr2plane444Formats#VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT} specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 12-bit B component in the top 12 bits of the word in bytes 0..1, and a 12-bit R component in the top 12 bits of the word in bytes 2..3, the bottom 4 bits of each word unused. Both planes have the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane.
  • *
  • {@link EXTYcbcr2plane444Formats#VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT} specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 16-bit B component in the word in bytes 0..1, and a 16-bit R component in the word in bytes 2..3. Both planes have the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined via {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout}, using {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} for the G plane, and {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} for the BR plane.
  • *
  • {@link IMGFormatPVRTC#VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG} specifies a four-component, PVRTC compressed format where each 64-bit compressed texel block encodes an 8×4 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link IMGFormatPVRTC#VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG} specifies a four-component, PVRTC compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link IMGFormatPVRTC#VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG} specifies a four-component, PVRTC compressed format where each 64-bit compressed texel block encodes an 8×4 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link IMGFormatPVRTC#VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG} specifies a four-component, PVRTC compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data.
  • *
  • {@link IMGFormatPVRTC#VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG} specifies a four-component, PVRTC compressed format where each 64-bit compressed texel block encodes an 8×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link IMGFormatPVRTC#VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG} specifies a four-component, PVRTC compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link IMGFormatPVRTC#VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG} specifies a four-component, PVRTC compressed format where each 64-bit compressed texel block encodes an 8×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
  • {@link IMGFormatPVRTC#VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG} specifies a four-component, PVRTC compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.
  • *
* *
See Also
* *

{@link VkAccelerationStructureGeometryTrianglesDataKHR}, {@link VkAttachmentDescription}, {@link VkAttachmentDescription2}, {@link VkBufferViewCreateInfo}, {@link VkCommandBufferInheritanceRenderingInfoKHR}, {@link VkFramebufferAttachmentImageInfo}, {@link VkGeometryTrianglesNV}, {@link VkImageCreateInfo}, {@link VkImageFormatListCreateInfo}, {@link VkImageViewASTCDecodeModeEXT}, {@link VkImageViewCreateInfo}, {@link VkPhysicalDeviceImageFormatInfo2}, {@link VkPhysicalDeviceSparseImageFormatInfo2}, {@link VkPipelineRenderingCreateInfoKHR}, {@link VkSamplerCustomBorderColorCreateInfoEXT}, {@link VkSamplerYcbcrConversionCreateInfo}, {@link VkSurfaceFormatKHR}, {@link VkSwapchainCreateInfoKHR}, {@link VkVertexInputAttributeDescription}, {@link VkVertexInputAttributeDescription2EXT}, {@link VkVideoFormatPropertiesKHR}, {@link VkVideoSessionCreateInfoKHR}, {@link NVExternalMemoryCapabilities#vkGetPhysicalDeviceExternalImageFormatPropertiesNV GetPhysicalDeviceExternalImageFormatPropertiesNV}, {@link #vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties}, {@link VK11#vkGetPhysicalDeviceFormatProperties2 GetPhysicalDeviceFormatProperties2}, {@link KHRGetPhysicalDeviceProperties2#vkGetPhysicalDeviceFormatProperties2KHR GetPhysicalDeviceFormatProperties2KHR}, {@link #vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties}, {@link #vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties}

*/ public static final int VK_FORMAT_UNDEFINED = 0, VK_FORMAT_R4G4_UNORM_PACK8 = 1, VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, VK_FORMAT_R8_UNORM = 9, VK_FORMAT_R8_SNORM = 10, VK_FORMAT_R8_USCALED = 11, VK_FORMAT_R8_SSCALED = 12, VK_FORMAT_R8_UINT = 13, VK_FORMAT_R8_SINT = 14, VK_FORMAT_R8_SRGB = 15, VK_FORMAT_R8G8_UNORM = 16, VK_FORMAT_R8G8_SNORM = 17, VK_FORMAT_R8G8_USCALED = 18, VK_FORMAT_R8G8_SSCALED = 19, VK_FORMAT_R8G8_UINT = 20, VK_FORMAT_R8G8_SINT = 21, VK_FORMAT_R8G8_SRGB = 22, VK_FORMAT_R8G8B8_UNORM = 23, VK_FORMAT_R8G8B8_SNORM = 24, VK_FORMAT_R8G8B8_USCALED = 25, VK_FORMAT_R8G8B8_SSCALED = 26, VK_FORMAT_R8G8B8_UINT = 27, VK_FORMAT_R8G8B8_SINT = 28, VK_FORMAT_R8G8B8_SRGB = 29, VK_FORMAT_B8G8R8_UNORM = 30, VK_FORMAT_B8G8R8_SNORM = 31, VK_FORMAT_B8G8R8_USCALED = 32, VK_FORMAT_B8G8R8_SSCALED = 33, VK_FORMAT_B8G8R8_UINT = 34, VK_FORMAT_B8G8R8_SINT = 35, VK_FORMAT_B8G8R8_SRGB = 36, VK_FORMAT_R8G8B8A8_UNORM = 37, VK_FORMAT_R8G8B8A8_SNORM = 38, VK_FORMAT_R8G8B8A8_USCALED = 39, VK_FORMAT_R8G8B8A8_SSCALED = 40, VK_FORMAT_R8G8B8A8_UINT = 41, VK_FORMAT_R8G8B8A8_SINT = 42, VK_FORMAT_R8G8B8A8_SRGB = 43, VK_FORMAT_B8G8R8A8_UNORM = 44, VK_FORMAT_B8G8R8A8_SNORM = 45, VK_FORMAT_B8G8R8A8_USCALED = 46, VK_FORMAT_B8G8R8A8_SSCALED = 47, VK_FORMAT_B8G8R8A8_UINT = 48, VK_FORMAT_B8G8R8A8_SINT = 49, VK_FORMAT_B8G8R8A8_SRGB = 50, VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, VK_FORMAT_R16_UNORM = 70, VK_FORMAT_R16_SNORM = 71, VK_FORMAT_R16_USCALED = 72, VK_FORMAT_R16_SSCALED = 73, VK_FORMAT_R16_UINT = 74, VK_FORMAT_R16_SINT = 75, VK_FORMAT_R16_SFLOAT = 76, VK_FORMAT_R16G16_UNORM = 77, VK_FORMAT_R16G16_SNORM = 78, VK_FORMAT_R16G16_USCALED = 79, VK_FORMAT_R16G16_SSCALED = 80, VK_FORMAT_R16G16_UINT = 81, VK_FORMAT_R16G16_SINT = 82, VK_FORMAT_R16G16_SFLOAT = 83, VK_FORMAT_R16G16B16_UNORM = 84, VK_FORMAT_R16G16B16_SNORM = 85, VK_FORMAT_R16G16B16_USCALED = 86, VK_FORMAT_R16G16B16_SSCALED = 87, VK_FORMAT_R16G16B16_UINT = 88, VK_FORMAT_R16G16B16_SINT = 89, VK_FORMAT_R16G16B16_SFLOAT = 90, VK_FORMAT_R16G16B16A16_UNORM = 91, VK_FORMAT_R16G16B16A16_SNORM = 92, VK_FORMAT_R16G16B16A16_USCALED = 93, VK_FORMAT_R16G16B16A16_SSCALED = 94, VK_FORMAT_R16G16B16A16_UINT = 95, VK_FORMAT_R16G16B16A16_SINT = 96, VK_FORMAT_R16G16B16A16_SFLOAT = 97, VK_FORMAT_R32_UINT = 98, VK_FORMAT_R32_SINT = 99, VK_FORMAT_R32_SFLOAT = 100, VK_FORMAT_R32G32_UINT = 101, VK_FORMAT_R32G32_SINT = 102, VK_FORMAT_R32G32_SFLOAT = 103, VK_FORMAT_R32G32B32_UINT = 104, VK_FORMAT_R32G32B32_SINT = 105, VK_FORMAT_R32G32B32_SFLOAT = 106, VK_FORMAT_R32G32B32A32_UINT = 107, VK_FORMAT_R32G32B32A32_SINT = 108, VK_FORMAT_R32G32B32A32_SFLOAT = 109, VK_FORMAT_R64_UINT = 110, VK_FORMAT_R64_SINT = 111, VK_FORMAT_R64_SFLOAT = 112, VK_FORMAT_R64G64_UINT = 113, VK_FORMAT_R64G64_SINT = 114, VK_FORMAT_R64G64_SFLOAT = 115, VK_FORMAT_R64G64B64_UINT = 116, VK_FORMAT_R64G64B64_SINT = 117, VK_FORMAT_R64G64B64_SFLOAT = 118, VK_FORMAT_R64G64B64A64_UINT = 119, VK_FORMAT_R64G64B64A64_SINT = 120, VK_FORMAT_R64G64B64A64_SFLOAT = 121, VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, VK_FORMAT_D16_UNORM = 124, VK_FORMAT_X8_D24_UNORM_PACK32 = 125, VK_FORMAT_D32_SFLOAT = 126, VK_FORMAT_S8_UINT = 127, VK_FORMAT_D16_UNORM_S8_UINT = 128, VK_FORMAT_D24_UNORM_S8_UINT = 129, VK_FORMAT_D32_SFLOAT_S8_UINT = 130, VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, VK_FORMAT_BC2_UNORM_BLOCK = 135, VK_FORMAT_BC2_SRGB_BLOCK = 136, VK_FORMAT_BC3_UNORM_BLOCK = 137, VK_FORMAT_BC3_SRGB_BLOCK = 138, VK_FORMAT_BC4_UNORM_BLOCK = 139, VK_FORMAT_BC4_SNORM_BLOCK = 140, VK_FORMAT_BC5_UNORM_BLOCK = 141, VK_FORMAT_BC5_SNORM_BLOCK = 142, VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, VK_FORMAT_BC7_UNORM_BLOCK = 145, VK_FORMAT_BC7_SRGB_BLOCK = 146, VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184; /** * VkFormatFeatureFlagBits - Bitmask specifying features supported by a buffer * *
Description
* *

These values all have the same meaning as the equivalently named values for {@code VkFormatFeatureFlags2KHR} and may be set in {@code linearTilingFeatures}, {@code optimalTilingFeatures}, and {@link VkDrmFormatModifierPropertiesEXT}{@code ::drmFormatModifierTilingFeatures}, specifying that the features are supported by images ({@code VkImage}) or image views ({@code VkImageView}) or sampler Y′CBCR conversion objects ({@code VkSamplerYcbcrConversion}) created with the queried {@link #vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties}{@code ::format}:

* *
    *
  • {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT FORMAT_FEATURE_SAMPLED_IMAGE_BIT} specifies that an image view can be sampled from.
  • *
  • {@link #VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT FORMAT_FEATURE_STORAGE_IMAGE_BIT} specifies that an image view can be used as a storage image.
  • *
  • {@link #VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT} specifies that an image view can be used as storage image that supports atomic operations.
  • *
  • {@link #VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BIT} specifies that an image view can be used as a framebuffer color attachment and as an input attachment.
  • *
  • {@link #VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT} specifies that an image view can be used as a framebuffer color attachment that supports blending and as an input attachment.
  • *
  • {@link #VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT} specifies that an image view can be used as a framebuffer depth/stencil attachment and as an input attachment.
  • *
  • {@link #VK_FORMAT_FEATURE_BLIT_SRC_BIT FORMAT_FEATURE_BLIT_SRC_BIT} specifies that an image can be used as {@code srcImage} for the {@code vkCmdBlitImage2KHR} and {@code vkCmdBlitImage} commands.
  • *
  • {@link #VK_FORMAT_FEATURE_BLIT_DST_BIT FORMAT_FEATURE_BLIT_DST_BIT} specifies that an image can be used as {@code dstImage} for the {@code vkCmdBlitImage2KHR} and {@code vkCmdBlitImage} commands.
  • *
  • {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT} specifies that if {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT FORMAT_FEATURE_SAMPLED_IMAGE_BIT} is also set, an image view can be used with a sampler that has either of {@code magFilter} or {@code minFilter} set to {@link #VK_FILTER_LINEAR FILTER_LINEAR}, or {@code mipmapMode} set to {@link #VK_SAMPLER_MIPMAP_MODE_LINEAR SAMPLER_MIPMAP_MODE_LINEAR}. If {@link #VK_FORMAT_FEATURE_BLIT_SRC_BIT FORMAT_FEATURE_BLIT_SRC_BIT} is also set, an image can be used as the {@code srcImage} to {@code vkCmdBlitImage2KHR} and {@code vkCmdBlitImage} with a {@code filter} of {@link #VK_FILTER_LINEAR FILTER_LINEAR}. This bit must only be exposed for formats that also support the {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT FORMAT_FEATURE_SAMPLED_IMAGE_BIT} or {@link #VK_FORMAT_FEATURE_BLIT_SRC_BIT FORMAT_FEATURE_BLIT_SRC_BIT}. * If the format being queried is a depth/stencil format, this bit only specifies that the depth aspect (not the stencil aspect) of an image of this format supports linear filtering, and that linear filtering of the depth aspect is supported whether depth compare is enabled in the sampler or not. Where depth comparison is supported it may be linear filtered whether this bit is present or not, but where this bit is not present the filtered value may be computed in an implementation-dependent manner which differs from the normal rules of linear filtering. The resulting value must be in the range [0,1] and should be proportional to, or a weighted average of, the number of comparison passes or failures. *
  • *
  • {@link VK11#VK_FORMAT_FEATURE_TRANSFER_SRC_BIT FORMAT_FEATURE_TRANSFER_SRC_BIT} specifies that an image can be used as a source image for copy commands.
  • *
  • {@link VK11#VK_FORMAT_FEATURE_TRANSFER_DST_BIT FORMAT_FEATURE_TRANSFER_DST_BIT} specifies that an image can be used as a destination image for copy commands and clear commands.
  • *
  • {@link VK12#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT} specifies {@code VkImage} can be used as a sampled image with a min or max {@code VkSamplerReductionMode}. This bit must only be exposed for formats that also support the {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT FORMAT_FEATURE_SAMPLED_IMAGE_BIT}.
  • *
  • {@link EXTFilterCubic#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT} specifies that {@code VkImage} can be used with a sampler that has either of {@code magFilter} or {@code minFilter} set to {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT}, or be the source image for a blit with {@code filter} set to {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT}. This bit must only be exposed for formats that also support the {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT FORMAT_FEATURE_SAMPLED_IMAGE_BIT}. If the format being queried is a depth/stencil format, this only specifies that the depth aspect is cubic filterable.
  • *
  • {@link VK11#VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT} specifies that an application can define a sampler Y′CBCR conversion using this format as a source, and that an image of this format can be used with a {@link VkSamplerYcbcrConversionCreateInfo} {@code xChromaOffset} and/or {@code yChromaOffset} of {@link VK11#VK_CHROMA_LOCATION_MIDPOINT CHROMA_LOCATION_MIDPOINT}. Otherwise both {@code xChromaOffset} and {@code yChromaOffset} must be {@link VK11#VK_CHROMA_LOCATION_COSITED_EVEN CHROMA_LOCATION_COSITED_EVEN}. If a format does not incorporate chroma downsampling (it is not a “422” or “420” format) but the implementation supports sampler Y′CBCR conversion for this format, the implementation must set {@link VK11#VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT}.
  • *
  • {@link VK11#VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT} specifies that an application can define a sampler Y′CBCR conversion using this format as a source, and that an image of this format can be used with a {@link VkSamplerYcbcrConversionCreateInfo} {@code xChromaOffset} and/or {@code yChromaOffset} of {@link VK11#VK_CHROMA_LOCATION_COSITED_EVEN CHROMA_LOCATION_COSITED_EVEN}. Otherwise both {@code xChromaOffset} and {@code yChromaOffset} must be {@link VK11#VK_CHROMA_LOCATION_MIDPOINT CHROMA_LOCATION_MIDPOINT}. If neither {@link VK11#VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT} nor {@link VK11#VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT} is set, the application must not define a sampler Y′CBCR conversion using this format as a source.
  • *
  • {@link VK11#VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT} specifies that an application can define a sampler Y′CBCR conversion using this format as a source with {@code chromaFilter} set to {@link #VK_FILTER_LINEAR FILTER_LINEAR}.
  • *
  • {@link VK11#VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT} specifies that the format can have different chroma, min, and mag filters.
  • *
  • {@link VK11#VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT} specifies that reconstruction is explicit, as described in Chroma Reconstruction. If this bit is not present, reconstruction is implicit by default.
  • *
  • {@link VK11#VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT} specifies that reconstruction can be forcibly made explicit by setting {@link VkSamplerYcbcrConversionCreateInfo}{@code ::forceExplicitReconstruction} to {@link #VK_TRUE TRUE}. If the format being queried supports {@link VK11#VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT} it must also support {@link VK11#VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT}.
  • *
  • {@link VK11#VK_FORMAT_FEATURE_DISJOINT_BIT FORMAT_FEATURE_DISJOINT_BIT} specifies that a multi-planar image can have the {@link VK11#VK_IMAGE_CREATE_DISJOINT_BIT IMAGE_CREATE_DISJOINT_BIT} set during image creation. An implementation must not set {@link VK11#VK_FORMAT_FEATURE_DISJOINT_BIT FORMAT_FEATURE_DISJOINT_BIT} for single-plane formats.
  • *
  • {@link EXTFragmentDensityMap#VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT} specifies that an image view can be used as a fragment density map attachment.
  • *
  • {@link KHRFragmentShadingRate#VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR} specifies that an image view can be used as a fragment shading rate attachment. An implementation must not set this feature for formats with numeric type other than {@code *UINT}, or set it as a buffer feature.
  • *
  • {@link KHRVideoDecodeQueue#VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR} specifies that an image view with this format can be used as an output for video decode operations
  • *
  • {@link KHRVideoDecodeQueue#VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR} specifies that an image view with this format can be used as a DPB for video decode operations
  • *
  • {@link KHRVideoEncodeQueue#VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR} specifies that an image view with this format can be used as an input to video encode operations
  • *
  • {@link KHRVideoEncodeQueue#VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR} specifies that an image view with this format can be used as a DPB for video encode operations
  • *
* *

The following bits may be set in {@code bufferFeatures}, specifying that the features are supported by buffers ({@code VkBuffer}) or buffer views ({@code VkBufferView}) created with the queried {@link #vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties}{@code ::format}:

* *
    *
  • {@link #VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT} specifies that the format can be used to create a buffer view that can be bound to a {@link #VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER} descriptor.
  • *
  • {@link #VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT} specifies that the format can be used to create a buffer view that can be bound to a {@link #VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER} descriptor.
  • *
  • {@link #VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT} specifies that atomic operations are supported on {@link #VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER} with this format.
  • *
  • {@link #VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT FORMAT_FEATURE_VERTEX_BUFFER_BIT} specifies that the format can be used as a vertex attribute format ({@link VkVertexInputAttributeDescription}{@code ::format}).
  • *
  • {@link KHRAccelerationStructure#VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR} specifies that the format can be used as the vertex format when creating an acceleration structure ({@link VkAccelerationStructureGeometryTrianglesDataKHR}{@code ::vertexFormat}). This format can also be used as the vertex format in host memory when doing host acceleration structure builds.
  • *
*/ public static final int VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x1, VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x2, VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x4, VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x8, VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x10, VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x20, VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x40, VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x80, VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x100, VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x200, VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x400, VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x800, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x1000; /** * VkImageCreateFlagBits - Bitmask specifying additional parameters of an image * *
Description
* *
    *
  • {@link #VK_IMAGE_CREATE_SPARSE_BINDING_BIT IMAGE_CREATE_SPARSE_BINDING_BIT} specifies that the image will be backed using sparse memory binding.
  • *
  • {@link #VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with the {@link #VK_IMAGE_CREATE_SPARSE_BINDING_BIT IMAGE_CREATE_SPARSE_BINDING_BIT} flag.
  • *
  • {@link #VK_IMAGE_CREATE_SPARSE_ALIASED_BIT IMAGE_CREATE_SPARSE_ALIASED_BIT} specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with the {@link #VK_IMAGE_CREATE_SPARSE_BINDING_BIT IMAGE_CREATE_SPARSE_BINDING_BIT} flag.
  • *
  • {@link #VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT IMAGE_CREATE_MUTABLE_FORMAT_BIT} specifies that the image can be used to create a {@code VkImageView} with a different format from the image. For multi-planar formats, {@link #VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT IMAGE_CREATE_MUTABLE_FORMAT_BIT} specifies that a {@code VkImageView} can be created of a plane of the image.
  • *
  • {@link #VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT IMAGE_CREATE_CUBE_COMPATIBLE_BIT} specifies that the image can be used to create a {@code VkImageView} of type {@link #VK_IMAGE_VIEW_TYPE_CUBE IMAGE_VIEW_TYPE_CUBE} or {@link #VK_IMAGE_VIEW_TYPE_CUBE_ARRAY IMAGE_VIEW_TYPE_CUBE_ARRAY}.
  • *
  • {@link VK11#VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT} specifies that the image can be used to create a {@code VkImageView} of type {@link #VK_IMAGE_VIEW_TYPE_2D IMAGE_VIEW_TYPE_2D} or {@link #VK_IMAGE_VIEW_TYPE_2D_ARRAY IMAGE_VIEW_TYPE_2D_ARRAY}.
  • *
  • {@link VK11#VK_IMAGE_CREATE_PROTECTED_BIT IMAGE_CREATE_PROTECTED_BIT} specifies that the image is a protected image.
  • *
  • {@link VK11#VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT} specifies that the image can be used with a non-zero value of the {@code splitInstanceBindRegionCount} member of a {@link VkBindImageMemoryDeviceGroupInfo} structure passed into {@link VK11#vkBindImageMemory2 BindImageMemory2}. This flag also has the effect of making the image use the standard sparse image block dimensions.
  • *
  • {@link VK11#VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT} specifies that the image having a compressed format can be used to create a {@code VkImageView} with an uncompressed format where each texel in the image view corresponds to a compressed texel block of the image.
  • *
  • {@link VK11#VK_IMAGE_CREATE_EXTENDED_USAGE_BIT IMAGE_CREATE_EXTENDED_USAGE_BIT} specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format a {@code VkImageView} created from the image can have.
  • *
  • {@link VK11#VK_IMAGE_CREATE_DISJOINT_BIT IMAGE_CREATE_DISJOINT_BIT} specifies that an image with a multi-planar format must have each plane separately bound to memory, rather than having a single memory binding for the whole image; the presence of this bit distinguishes a disjoint image from an image without this bit set.
  • *
  • {@link VK11#VK_IMAGE_CREATE_ALIAS_BIT IMAGE_CREATE_ALIAS_BIT} specifies that two images created with the same creation parameters and aliased to the same memory can interpret the contents of the memory consistently with each other, subject to the rules described in the Memory Aliasing section. This flag further specifies that each plane of a disjoint image can share an in-memory non-linear representation with single-plane images, and that a single-plane image can share an in-memory non-linear representation with a plane of a multi-planar disjoint image, according to the rules in Compatible formats of planes of multi-planar formats. If the {@code pNext} chain includes a {@link VkExternalMemoryImageCreateInfo} or {@link VkExternalMemoryImageCreateInfoNV} structure whose {@code handleTypes} member is not 0, it is as if {@link VK11#VK_IMAGE_CREATE_ALIAS_BIT IMAGE_CREATE_ALIAS_BIT} is set.
  • *
  • {@link EXTSampleLocations#VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT} specifies that an image with a depth or depth/stencil format can be used with custom sample locations when used as a depth/stencil attachment.
  • *
  • {@link NVCornerSampledImage#VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV IMAGE_CREATE_CORNER_SAMPLED_BIT_NV} specifies that the image is a corner-sampled image.
  • *
  • {@link EXTFragmentDensityMap#VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT IMAGE_CREATE_SUBSAMPLED_BIT_EXT} specifies that an image can be in a subsampled format which may be more optimal when written as an attachment by a render pass that has a fragment density map attachment. Accessing a subsampled image has additional considerations: * *
      *
    • Image data read as an image sampler will have undefined values if the sampler was not created with {@code flags} containing {@link EXTFragmentDensityMap#VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT SAMPLER_CREATE_SUBSAMPLED_BIT_EXT} or was not sampled through the use of a combined image sampler with an immutable sampler in {@link VkDescriptorSetLayoutBinding}.
    • *
    • Image data read with an input attachment will have undefined values if the contents were not written as an attachment in an earlier subpass of the same render pass.
    • *
    • Image data read as an image sampler in the fragment shader will be additionally be read by the device during {@link #VK_PIPELINE_STAGE_VERTEX_SHADER_BIT PIPELINE_STAGE_VERTEX_SHADER_BIT} if {@link VkPhysicalDeviceFragmentDensityMap2PropertiesEXT}{@code ::subsampledCoarseReconstructionEarlyAccess} is {@link #VK_TRUE TRUE} and the sampler was created with {@code flags} containing {@link EXTFragmentDensityMap#VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT}.
    • *
    • Image data read with load operations are resampled to the fragment density of the render pass if {@link VkPhysicalDeviceFragmentDensityMap2PropertiesEXT}{@code ::subsampledLoads} is {@link #VK_TRUE TRUE}. Otherwise, values of image data are undefined.
    • *
    • Image contents outside of the render area take on undefined values if the image is stored as a render pass attachment.
    • *
    *
  • *
* *

See Sparse Resource Features and Sparse Physical Device Features for more details.

*/ public static final int VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x1, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x2, VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x4, VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x8, VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x10; /** * VkSampleCountFlagBits - Bitmask specifying sample counts supported for an image used for storage operations * *
Description
* *
    *
  • {@link #VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT} specifies an image with one sample per pixel.
  • *
  • {@link #VK_SAMPLE_COUNT_2_BIT SAMPLE_COUNT_2_BIT} specifies an image with 2 samples per pixel.
  • *
  • {@link #VK_SAMPLE_COUNT_4_BIT SAMPLE_COUNT_4_BIT} specifies an image with 4 samples per pixel.
  • *
  • {@link #VK_SAMPLE_COUNT_8_BIT SAMPLE_COUNT_8_BIT} specifies an image with 8 samples per pixel.
  • *
  • {@link #VK_SAMPLE_COUNT_16_BIT SAMPLE_COUNT_16_BIT} specifies an image with 16 samples per pixel.
  • *
  • {@link #VK_SAMPLE_COUNT_32_BIT SAMPLE_COUNT_32_BIT} specifies an image with 32 samples per pixel.
  • *
  • {@link #VK_SAMPLE_COUNT_64_BIT SAMPLE_COUNT_64_BIT} specifies an image with 64 samples per pixel.
  • *
* *
See Also
* *

{@link VkAttachmentDescription}, {@link VkAttachmentDescription2}, {@link VkAttachmentSampleCountInfoAMD}, {@link VkCommandBufferInheritanceRenderingInfoKHR}, {@link VkFramebufferMixedSamplesCombinationNV}, {@link VkImageCreateInfo}, {@link VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV}, {@link VkPhysicalDeviceFragmentShadingRatePropertiesKHR}, {@link VkPhysicalDeviceSparseImageFormatInfo2}, {@link VkPipelineMultisampleStateCreateInfo}, {@link VkSampleLocationsInfoEXT}, {@link EXTSampleLocations#vkGetPhysicalDeviceMultisamplePropertiesEXT GetPhysicalDeviceMultisamplePropertiesEXT}, {@link #vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties}

*/ public static final int VK_SAMPLE_COUNT_1_BIT = 0x1, VK_SAMPLE_COUNT_2_BIT = 0x2, VK_SAMPLE_COUNT_4_BIT = 0x4, VK_SAMPLE_COUNT_8_BIT = 0x8, VK_SAMPLE_COUNT_16_BIT = 0x10, VK_SAMPLE_COUNT_32_BIT = 0x20, VK_SAMPLE_COUNT_64_BIT = 0x40; /** * VkImageTiling - Specifies the tiling arrangement of data in an image * *
Description
* *
    *
  • {@link #VK_IMAGE_TILING_OPTIMAL IMAGE_TILING_OPTIMAL} specifies optimal tiling (texels are laid out in an implementation-dependent arrangement, for more efficient memory access).
  • *
  • {@link #VK_IMAGE_TILING_LINEAR IMAGE_TILING_LINEAR} specifies linear tiling (texels are laid out in memory in row-major order, possibly with some padding on each row).
  • *
  • {@link EXTImageDrmFormatModifier#VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT} indicates that the image’s tiling is defined by a Linux DRM format modifier. The modifier is specified at image creation with {@link VkImageDrmFormatModifierListCreateInfoEXT} or {@link VkImageDrmFormatModifierExplicitCreateInfoEXT}, and can be queried with {@link EXTImageDrmFormatModifier#vkGetImageDrmFormatModifierPropertiesEXT GetImageDrmFormatModifierPropertiesEXT}.
  • *
* *
See Also
* *

{@link VkImageCreateInfo}, {@link VkPhysicalDeviceImageFormatInfo2}, {@link VkPhysicalDeviceSparseImageFormatInfo2}, {@link NVExternalMemoryCapabilities#vkGetPhysicalDeviceExternalImageFormatPropertiesNV GetPhysicalDeviceExternalImageFormatPropertiesNV}, {@link #vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties}, {@link #vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties}

*/ public static final int VK_IMAGE_TILING_OPTIMAL = 0, VK_IMAGE_TILING_LINEAR = 1; /** * VkImageType - Specifies the type of an image object * *
Description
* *
    *
  • {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} specifies a one-dimensional image.
  • *
  • {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D} specifies a two-dimensional image.
  • *
  • {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D} specifies a three-dimensional image.
  • *
* *
See Also
* *

{@link VkImageCreateInfo}, {@link VkPhysicalDeviceImageFormatInfo2}, {@link VkPhysicalDeviceSparseImageFormatInfo2}, {@link NVExternalMemoryCapabilities#vkGetPhysicalDeviceExternalImageFormatPropertiesNV GetPhysicalDeviceExternalImageFormatPropertiesNV}, {@link #vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties}, {@link #vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties}

*/ public static final int VK_IMAGE_TYPE_1D = 0, VK_IMAGE_TYPE_2D = 1, VK_IMAGE_TYPE_3D = 2; /** * VkImageUsageFlagBits - Bitmask specifying intended usage of an image * *
Description
* *
    *
  • {@link #VK_IMAGE_USAGE_TRANSFER_SRC_BIT IMAGE_USAGE_TRANSFER_SRC_BIT} specifies that the image can be used as the source of a transfer command.
  • *
  • {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} specifies that the image can be used as the destination of a transfer command.
  • *
  • {@link #VK_IMAGE_USAGE_SAMPLED_BIT IMAGE_USAGE_SAMPLED_BIT} specifies that the image can be used to create a {@code VkImageView} suitable for occupying a {@code VkDescriptorSet} slot either of type {@link #VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE DESCRIPTOR_TYPE_SAMPLED_IMAGE} or {@link #VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER}, and be sampled by a shader.
  • *
  • {@link #VK_IMAGE_USAGE_STORAGE_BIT IMAGE_USAGE_STORAGE_BIT} specifies that the image can be used to create a {@code VkImageView} suitable for occupying a {@code VkDescriptorSet} slot of type {@link #VK_DESCRIPTOR_TYPE_STORAGE_IMAGE DESCRIPTOR_TYPE_STORAGE_IMAGE}.
  • *
  • {@link #VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT IMAGE_USAGE_COLOR_ATTACHMENT_BIT} specifies that the image can be used to create a {@code VkImageView} suitable for use as a color or resolve attachment in a {@code VkFramebuffer}.
  • *
  • {@link #VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT} specifies that the image can be used to create a {@code VkImageView} suitable for use as a depth/stencil or depth/stencil resolve attachment in a {@code VkFramebuffer}.
  • *
  • {@link #VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT} specifies that implementations may support using memory allocations with the {@link #VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT} to back an image with this usage. This bit can be set for any image that can be used to create a {@code VkImageView} suitable for use as a color, resolve, depth/stencil, or input attachment.
  • *
  • {@link #VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT IMAGE_USAGE_INPUT_ATTACHMENT_BIT} specifies that the image can be used to create a {@code VkImageView} suitable for occupying {@code VkDescriptorSet} slot of type {@link #VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT DESCRIPTOR_TYPE_INPUT_ATTACHMENT}; be read from a shader as an input attachment; and be used as an input attachment in a framebuffer.
  • *
  • {@link EXTFragmentDensityMap#VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT} specifies that the image can be used to create a {@code VkImageView} suitable for use as a fragment density map image.
  • *
  • {@link KHRFragmentShadingRate#VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR} specifies that the image can be used to create a {@code VkImageView} suitable for use as a fragment shading rate attachment or shading rate image
  • *
  • {@link KHRVideoDecodeQueue#VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR} specifies that video decode operations can use the image as a reference picture, or a source of postprocessing, or transfer operation.
  • *
  • {@link KHRVideoDecodeQueue#VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR} specifies that video decode operations can use the image as a DPB Video Picture Resource, representing a reference picture. This flag must be combined with {@link KHRVideoDecodeQueue#VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR} and {@link KHRVideoDecodeQueue#VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR}. {@link KHRVideoDecodeQueue#VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR} is required for DPB image resources because these resources will be associated with reference pictures after acting as targets for video decode operations. {@link KHRVideoDecodeQueue#VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR} is required for DPB image resources because the reference pictures associated with them act as information sources for subsequent decode operations.
  • *
  • {@link KHRVideoEncodeQueue#VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR} specifies that the image can be used as an input picture for video encode operations.
  • *
  • {@link KHRVideoEncodeQueue#VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR} specifies that video encode operations can use the image to hold a reconstructed picture, and to act as a reference picture. This flag must be combined with {@link KHRVideoEncodeQueue#VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR} and {@link KHRVideoEncodeQueue#VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR}. {@link KHRVideoEncodeQueue#VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR} is required for a DPB image resource because the reconstructed picture resulting from an encode operation will be written to it. {@link KHRVideoEncodeQueue#VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR} is required for DPB image resources because it can be used as a reconstructed reference picture source for the encode operation.
  • *
*/ public static final int VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x1, VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x2, VK_IMAGE_USAGE_SAMPLED_BIT = 0x4, VK_IMAGE_USAGE_STORAGE_BIT = 0x8, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x10, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x20, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x40, VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x80; /** * VkMemoryHeapFlagBits - Bitmask specifying attribute flags for a heap * *
Description
* *
    *
  • {@link #VK_MEMORY_HEAP_DEVICE_LOCAL_BIT MEMORY_HEAP_DEVICE_LOCAL_BIT} specifies that the heap corresponds to device-local memory. Device-local memory may have different performance characteristics than host-local memory, and may support different memory property flags.
  • *
  • {@link VK11#VK_MEMORY_HEAP_MULTI_INSTANCE_BIT MEMORY_HEAP_MULTI_INSTANCE_BIT} specifies that in a logical device representing more than one physical device, there is a per-physical device instance of the heap memory. By default, an allocation from such a heap will be replicated to each physical device’s instance of the heap.
  • *
*/ public static final int VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x1; /** * VkMemoryPropertyFlagBits - Bitmask specifying properties for a memory type * *
Description
* *
    *
  • {@link #VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT MEMORY_PROPERTY_DEVICE_LOCAL_BIT} bit specifies that memory allocated with this type is the most efficient for device access. This property will be set if and only if the memory type belongs to a heap with the {@link #VK_MEMORY_HEAP_DEVICE_LOCAL_BIT MEMORY_HEAP_DEVICE_LOCAL_BIT} set.
  • *
  • {@link #VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT MEMORY_PROPERTY_HOST_VISIBLE_BIT} bit specifies that memory allocated with this type can be mapped for host access using {@link #vkMapMemory MapMemory}.
  • *
  • {@link #VK_MEMORY_PROPERTY_HOST_COHERENT_BIT MEMORY_PROPERTY_HOST_COHERENT_BIT} bit specifies that the host cache management commands {@link #vkFlushMappedMemoryRanges FlushMappedMemoryRanges} and {@link #vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges} are not needed to flush host writes to the device or make device writes visible to the host, respectively.
  • *
  • {@link #VK_MEMORY_PROPERTY_HOST_CACHED_BIT MEMORY_PROPERTY_HOST_CACHED_BIT} bit specifies that memory allocated with this type is cached on the host. Host memory accesses to uncached memory are slower than to cached memory, however uncached memory is always host coherent.
  • *
  • {@link #VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT} bit specifies that the memory type only allows device access to the memory. Memory types must not have both {@link #VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT} and {@link #VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT MEMORY_PROPERTY_HOST_VISIBLE_BIT} set. Additionally, the object’s backing memory may be provided by the implementation lazily as specified in Lazily Allocated Memory.
  • *
  • {@link VK11#VK_MEMORY_PROPERTY_PROTECTED_BIT MEMORY_PROPERTY_PROTECTED_BIT} bit specifies that the memory type only allows device access to the memory, and allows protected queue operations to access the memory. Memory types must not have {@link VK11#VK_MEMORY_PROPERTY_PROTECTED_BIT MEMORY_PROPERTY_PROTECTED_BIT} set and any of {@link #VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT MEMORY_PROPERTY_HOST_VISIBLE_BIT} set, or {@link #VK_MEMORY_PROPERTY_HOST_COHERENT_BIT MEMORY_PROPERTY_HOST_COHERENT_BIT} set, or {@link #VK_MEMORY_PROPERTY_HOST_CACHED_BIT MEMORY_PROPERTY_HOST_CACHED_BIT} set.
  • *
  • {@link AMDDeviceCoherentMemory#VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD} bit specifies that device accesses to allocations of this memory type are automatically made available and visible.
  • *
  • {@link AMDDeviceCoherentMemory#VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD} bit specifies that memory allocated with this type is not cached on the device. Uncached device memory is always device coherent.
  • *
  • {@link NVExternalMemoryRdma#VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV} bit specifies that external devices can access this memory directly.
  • *
* *

For any memory allocated with both the {@link #VK_MEMORY_PROPERTY_HOST_COHERENT_BIT MEMORY_PROPERTY_HOST_COHERENT_BIT} and the {@link AMDDeviceCoherentMemory#VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD}, host or device accesses also perform automatic memory domain transfer operations, such that writes are always automatically available and visible to both host and device memory domains.

* *
Note
* *

Device coherence is a useful property for certain debugging use cases (e.g. crash analysis, where performing separate coherence actions could mean values are not reported correctly). However, device coherent accesses may be slower than equivalent accesses without device coherence, particularly if they are also device uncached. For device uncached memory in particular, repeated accesses to the same or neighbouring memory locations over a short time period (e.g. within a frame) may be slower than it would be for the equivalent cached memory type. As such, it is generally inadvisable to use device coherent or device uncached memory except when really needed.

*
*/ public static final int VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x1, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x2, VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x4, VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x8, VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x10; /** * VkPhysicalDeviceType - Supported physical device types * *
Description
* *
    *
  • {@link #VK_PHYSICAL_DEVICE_TYPE_OTHER PHYSICAL_DEVICE_TYPE_OTHER} - the device does not match any other available types.
  • *
  • {@link #VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU} - the device is typically one embedded in or tightly coupled with the host.
  • *
  • {@link #VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU PHYSICAL_DEVICE_TYPE_DISCRETE_GPU} - the device is typically a separate processor connected to the host via an interlink.
  • *
  • {@link #VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU} - the device is typically a virtual node in a virtualization environment.
  • *
  • {@link #VK_PHYSICAL_DEVICE_TYPE_CPU PHYSICAL_DEVICE_TYPE_CPU} - the device is typically running on the same processors as the host.
  • *
* *

The physical device type is advertised for informational purposes only, and does not directly affect the operation of the system. However, the device type may correlate with other advertised properties or capabilities of the system, such as how many memory heaps there are.

* *
See Also
* *

{@link VkPhysicalDeviceProperties}

*/ public static final int VK_PHYSICAL_DEVICE_TYPE_OTHER = 0, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2, VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3, VK_PHYSICAL_DEVICE_TYPE_CPU = 4; /** * VkQueueFlagBits - Bitmask specifying capabilities of queues in a queue family * *
Description
* *
    *
  • {@link #VK_QUEUE_GRAPHICS_BIT QUEUE_GRAPHICS_BIT} specifies that queues in this queue family support graphics operations.
  • *
  • {@link #VK_QUEUE_COMPUTE_BIT QUEUE_COMPUTE_BIT} specifies that queues in this queue family support compute operations.
  • *
  • {@link #VK_QUEUE_TRANSFER_BIT QUEUE_TRANSFER_BIT} specifies that queues in this queue family support transfer operations.
  • *
  • {@link #VK_QUEUE_SPARSE_BINDING_BIT QUEUE_SPARSE_BINDING_BIT} specifies that queues in this queue family support sparse memory management operations (see Sparse Resources). If any of the sparse resource features are enabled, then at least one queue family must support this bit.
  • *
  • {@link KHRVideoDecodeQueue#VK_QUEUE_VIDEO_DECODE_BIT_KHR QUEUE_VIDEO_DECODE_BIT_KHR} specifies that queues in this queue family support Video Decode operations.
  • *
  • {@link KHRVideoEncodeQueue#VK_QUEUE_VIDEO_ENCODE_BIT_KHR QUEUE_VIDEO_ENCODE_BIT_KHR} specifies that queues in this queue family support Video Encode operations.
  • *
  • {@link VK11#VK_QUEUE_PROTECTED_BIT QUEUE_PROTECTED_BIT} specifies that queues in this queue family support the {@link VK11#VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT DEVICE_QUEUE_CREATE_PROTECTED_BIT} bit. (see Protected Memory). If the physical device supports the {@code protectedMemory} feature, at least one of its queue families must support this bit.
  • *
* *

If an implementation exposes any queue family that supports graphics operations, at least one queue family of at least one physical device exposed by the implementation must support both graphics and compute operations.

* *

Furthermore, if the protected memory physical device feature is supported, then at least one queue family of at least one physical device exposed by the implementation must support graphics operations, compute operations, and protected memory operations.

* *
Note
* *

All commands that are allowed on a queue that supports transfer operations are also allowed on a queue that supports either graphics or compute operations. Thus, if the capabilities of a queue family include {@link #VK_QUEUE_GRAPHICS_BIT QUEUE_GRAPHICS_BIT} or {@link #VK_QUEUE_COMPUTE_BIT QUEUE_COMPUTE_BIT}, then reporting the {@link #VK_QUEUE_TRANSFER_BIT QUEUE_TRANSFER_BIT} capability separately for that queue family is optional.

*
* *

For further details see Queues.

*/ public static final int VK_QUEUE_GRAPHICS_BIT = 0x1, VK_QUEUE_COMPUTE_BIT = 0x2, VK_QUEUE_TRANSFER_BIT = 0x4, VK_QUEUE_SPARSE_BINDING_BIT = 0x8; /** * VkPipelineStageFlagBits - Bitmask specifying pipeline stages * *
Description
* *

These values all have the same meaning as the equivalently named values for {@code VkPipelineStageFlags2KHR}.

* *
    *
  • {@link KHRSynchronization2#VK_PIPELINE_STAGE_NONE_KHR PIPELINE_STAGE_NONE_KHR} specifies no stages of execution.
  • *
  • {@link #VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT PIPELINE_STAGE_DRAW_INDIRECT_BIT} specifies the stage of the pipeline where stext:VkDrawIndirect* / stext:VkDispatchIndirect* / stext:VkTraceRaysIndirect* data structures are consumed. This stage also includes reading commands written by {@link NVDeviceGeneratedCommands#vkCmdExecuteGeneratedCommandsNV CmdExecuteGeneratedCommandsNV}.
  • *
  • {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV} specifies the task shader stage.
  • *
  • {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV} specifies the mesh shader stage.
  • *
  • {@link #VK_PIPELINE_STAGE_VERTEX_INPUT_BIT PIPELINE_STAGE_VERTEX_INPUT_BIT} specifies the stage of the pipeline where vertex and index buffers are consumed.
  • *
  • {@link #VK_PIPELINE_STAGE_VERTEX_SHADER_BIT PIPELINE_STAGE_VERTEX_SHADER_BIT} specifies the vertex shader stage.
  • *
  • {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT} specifies the tessellation control shader stage.
  • *
  • {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT} specifies the tessellation evaluation shader stage.
  • *
  • {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT} specifies the geometry shader stage.
  • *
  • {@link #VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT PIPELINE_STAGE_FRAGMENT_SHADER_BIT} specifies the fragment shader stage.
  • *
  • {@link #VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT} specifies the stage of the pipeline where early fragment tests (depth and stencil tests before fragment shading) are performed. This stage also includes subpass load operations for framebuffer attachments with a depth/stencil format.
  • *
  • {@link #VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT} specifies the stage of the pipeline where late fragment tests (depth and stencil tests after fragment shading) are performed. This stage also includes subpass store operations for framebuffer attachments with a depth/stencil format.
  • *
  • {@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT} specifies the stage of the pipeline after blending where the final color values are output from the pipeline. This stage also includes subpass load and store operations and multisample resolve operations for framebuffer attachments with a color or depth/stencil format.
  • *
  • {@link #VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT PIPELINE_STAGE_COMPUTE_SHADER_BIT} specifies the execution of a compute shader.
  • *
  • {@link #VK_PIPELINE_STAGE_TRANSFER_BIT PIPELINE_STAGE_TRANSFER_BIT} specifies the following commands: * *
      *
    • All copy commands, including {@link #vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults}
    • *
    • {@link KHRCopyCommands2#vkCmdBlitImage2KHR CmdBlitImage2KHR} and {@link #vkCmdBlitImage CmdBlitImage}
    • *
    • {@link KHRCopyCommands2#vkCmdResolveImage2KHR CmdResolveImage2KHR} and {@link #vkCmdResolveImage CmdResolveImage}
    • *
    • All clear commands, with the exception of {@link #vkCmdClearAttachments CmdClearAttachments}
    • *
    *
  • *
  • {@link #VK_PIPELINE_STAGE_HOST_BIT PIPELINE_STAGE_HOST_BIT} specifies a pseudo-stage indicating execution on the host of reads/writes of device memory. This stage is not invoked by any commands recorded in a command buffer.
  • *
  • {@link KHRAccelerationStructure#VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR} specifies the execution of {@link NVRayTracing#vkCmdBuildAccelerationStructureNV CmdBuildAccelerationStructureNV}, {@link NVRayTracing#vkCmdCopyAccelerationStructureNV CmdCopyAccelerationStructureNV}, {@link NVRayTracing#vkCmdWriteAccelerationStructuresPropertiesNV CmdWriteAccelerationStructuresPropertiesNV} , {@link KHRAccelerationStructure#vkCmdBuildAccelerationStructuresKHR CmdBuildAccelerationStructuresKHR}, {@link KHRAccelerationStructure#vkCmdBuildAccelerationStructuresIndirectKHR CmdBuildAccelerationStructuresIndirectKHR}, {@link KHRAccelerationStructure#vkCmdCopyAccelerationStructureKHR CmdCopyAccelerationStructureKHR}, {@link KHRAccelerationStructure#vkCmdCopyAccelerationStructureToMemoryKHR CmdCopyAccelerationStructureToMemoryKHR}, {@link KHRAccelerationStructure#vkCmdCopyMemoryToAccelerationStructureKHR CmdCopyMemoryToAccelerationStructureKHR}, and {@link KHRAccelerationStructure#vkCmdWriteAccelerationStructuresPropertiesKHR CmdWriteAccelerationStructuresPropertiesKHR}.
  • *
  • {@link KHRRayTracingPipeline#VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR} specifies the execution of the ray tracing shader stages, via {@link NVRayTracing#vkCmdTraceRaysNV CmdTraceRaysNV} , {@link KHRRayTracingPipeline#vkCmdTraceRaysKHR CmdTraceRaysKHR}, or {@link KHRRayTracingPipeline#vkCmdTraceRaysIndirectKHR CmdTraceRaysIndirectKHR}
  • *
  • {@link #VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT PIPELINE_STAGE_ALL_GRAPHICS_BIT} specifies the execution of all graphics pipeline stages, and is equivalent to the logical OR of: * *
      *
    • {@link #VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT PIPELINE_STAGE_DRAW_INDIRECT_BIT}
    • *
    • {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}
    • *
    • {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}
    • *
    • {@link #VK_PIPELINE_STAGE_VERTEX_INPUT_BIT PIPELINE_STAGE_VERTEX_INPUT_BIT}
    • *
    • {@link #VK_PIPELINE_STAGE_VERTEX_SHADER_BIT PIPELINE_STAGE_VERTEX_SHADER_BIT}
    • *
    • {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT}
    • *
    • {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}
    • *
    • {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}
    • *
    • {@link #VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT PIPELINE_STAGE_FRAGMENT_SHADER_BIT}
    • *
    • {@link #VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT}
    • *
    • {@link #VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT}
    • *
    • {@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT}
    • *
    • {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT}
    • *
    • {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
    • *
    • {@link KHRFragmentShadingRate#VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR}
    • *
    • {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT}
    • *
    *
  • *
  • {@link #VK_PIPELINE_STAGE_ALL_COMMANDS_BIT PIPELINE_STAGE_ALL_COMMANDS_BIT} specifies all operations performed by all commands supported on the queue it is used with.
  • *
  • {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT} specifies the stage of the pipeline where the predicate of conditional rendering is consumed.
  • *
  • {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT} specifies the stage of the pipeline where vertex attribute output values are written to the transform feedback buffers.
  • *
  • {@link NVDeviceGeneratedCommands#VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV} specifies the stage of the pipeline where device-side preprocessing for generated commands via {@link NVDeviceGeneratedCommands#vkCmdPreprocessGeneratedCommandsNV CmdPreprocessGeneratedCommandsNV} is handled.
  • *
  • {@link KHRFragmentShadingRate#VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR} specifies the stage of the pipeline where the fragment shading rate attachment or shading rate image is read to determine the fragment shading rate for portions of a rasterized primitive.
  • *
  • {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT} specifies the stage of the pipeline where the fragment density map is read to generate the fragment areas.
  • *
  • {@link #VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT PIPELINE_STAGE_TOP_OF_PIPE_BIT} is equivalent to {@link #VK_PIPELINE_STAGE_ALL_COMMANDS_BIT PIPELINE_STAGE_ALL_COMMANDS_BIT} with {@code VkAccessFlags} set to 0 when specified in the second synchronization scope, but specifies no stage of execution when specified in the first scope.
  • *
  • {@link #VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT} is equivalent to {@link #VK_PIPELINE_STAGE_ALL_COMMANDS_BIT PIPELINE_STAGE_ALL_COMMANDS_BIT} with {@code VkAccessFlags} set to 0 when specified in the first synchronization scope, but specifies no stage of execution when specified in the second scope.
  • *
* *
See Also
* *

{@link VkCheckpointDataNV}, {@link AMDBufferMarker#vkCmdWriteBufferMarkerAMD CmdWriteBufferMarkerAMD}, {@link #vkCmdWriteTimestamp CmdWriteTimestamp}

*/ public static final int VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x1, VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x2, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x4, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x8, VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x10, VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x20, VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x40, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x80, VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x100, VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x200, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x400, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x800, VK_PIPELINE_STAGE_TRANSFER_BIT = 0x1000, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x2000, VK_PIPELINE_STAGE_HOST_BIT = 0x4000, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x8000, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x10000; /** * VkSparseMemoryBindFlagBits - Bitmask specifying usage of a sparse memory binding operation * *
Description
* *
    *
  • {@link #VK_SPARSE_MEMORY_BIND_METADATA_BIT SPARSE_MEMORY_BIND_METADATA_BIT} specifies that the memory being bound is only for the metadata aspect.
  • *
*/ public static final int VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x1; /** * VkSparseImageFormatFlagBits - Bitmask specifying additional information about a sparse image resource * *
Description
* *
    *
  • {@link #VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT} specifies that the image uses a single mip tail region for all array layers.
  • *
  • {@link #VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT} specifies that the first mip level whose dimensions are not integer multiples of the corresponding dimensions of the sparse image block begins the mip tail region.
  • *
  • {@link #VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT} specifies that the image uses non-standard sparse image block dimensions, and the {@code imageGranularity} values do not match the standard sparse image block dimensions for the given format.
  • *
*/ public static final int VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x1, VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x2, VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x4; /** * VkFenceCreateFlagBits - Bitmask specifying initial state and behavior of a fence * *
Description
* *
    *
  • {@link #VK_FENCE_CREATE_SIGNALED_BIT FENCE_CREATE_SIGNALED_BIT} specifies that the fence object is created in the signaled state. Otherwise, it is created in the unsignaled state.
  • *
*/ public static final int VK_FENCE_CREATE_SIGNALED_BIT = 0x1; /** * VkQueryPipelineStatisticFlagBits - Bitmask specifying queried pipeline statistics * *
Description
* *
    *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT} specifies that queries managed by the pool will count the number of vertices processed by the input assembly stage. Vertices corresponding to incomplete primitives may contribute to the count.
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT} specifies that queries managed by the pool will count the number of primitives processed by the input assembly stage. If primitive restart is enabled, restarting the primitive topology has no effect on the count. Incomplete primitives may be counted.
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT} specifies that queries managed by the pool will count the number of vertex shader invocations. This counter’s value is incremented each time a vertex shader is invoked.
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT} specifies that queries managed by the pool will count the number of geometry shader invocations. This counter’s value is incremented each time a geometry shader is invoked. In the case of instanced geometry shaders, the geometry shader invocations count is incremented for each separate instanced invocation.
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT} specifies that queries managed by the pool will count the number of primitives generated by geometry shader invocations. The counter’s value is incremented each time the geometry shader emits a primitive. Restarting primitive topology using the SPIR-V instructions {@code OpEndPrimitive} or {@code OpEndStreamPrimitive} has no effect on the geometry shader output primitives count.
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT} specifies that queries managed by the pool will count the number of primitives processed by the Primitive Clipping stage of the pipeline. The counter’s value is incremented each time a primitive reaches the primitive clipping stage.
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT} specifies that queries managed by the pool will count the number of primitives output by the Primitive Clipping stage of the pipeline. The counter’s value is incremented each time a primitive passes the primitive clipping stage. The actual number of primitives output by the primitive clipping stage for a particular input primitive is implementation-dependent but must satisfy the following conditions: * *
      *
    • If at least one vertex of the input primitive lies inside the clipping volume, the counter is incremented by one or more.
    • *
    • Otherwise, the counter is incremented by zero or more.
    • *
    *
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT} specifies that queries managed by the pool will count the number of fragment shader invocations. The counter’s value is incremented each time the fragment shader is invoked.
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT} specifies that queries managed by the pool will count the number of patches processed by the tessellation control shader. The counter’s value is incremented once for each patch for which a tessellation control shader is invoked.
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT} specifies that queries managed by the pool will count the number of invocations of the tessellation evaluation shader. The counter’s value is incremented each time the tessellation evaluation shader is invoked.
  • *
  • {@link #VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT} specifies that queries managed by the pool will count the number of compute shader invocations. The counter’s value is incremented every time the compute shader is invoked. Implementations may skip the execution of certain compute shader invocations or execute additional compute shader invocations for implementation-dependent reasons as long as the results of rendering otherwise remain unchanged.
  • *
* *

These values are intended to measure relative statistics on one implementation. Various device architectures will count these values differently. Any or all counters may be affected by the issues described in Query Operation.

* *
Note
* *

For example, tile-based rendering devices may need to replay the scene multiple times, affecting some of the counts.

*
* *

If a pipeline has {@code rasterizerDiscardEnable} enabled, implementations may discard primitives after the final pre-rasterization shader stage. As a result, if {@code rasterizerDiscardEnable} is enabled, the clipping input and output primitives counters may not be incremented.

* *

When a pipeline statistics query finishes, the result for that query is marked as available. The application can copy the result to a buffer (via {@code vkCmdCopyQueryPoolResults}), or request it be put into host memory (via {@code vkGetQueryPoolResults}).

*/ public static final int VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x1, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x2, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x4, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x8, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x10, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x20, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x40, VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x80, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x100, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x200, VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x400; /** * VkQueryType - Specify the type of queries managed by a query pool * *
Description
* *
    *
  • {@link #VK_QUERY_TYPE_OCCLUSION QUERY_TYPE_OCCLUSION} specifies an occlusion query.
  • *
  • {@link #VK_QUERY_TYPE_PIPELINE_STATISTICS QUERY_TYPE_PIPELINE_STATISTICS} specifies a pipeline statistics query.
  • *
  • {@link #VK_QUERY_TYPE_TIMESTAMP QUERY_TYPE_TIMESTAMP} specifies a timestamp query.
  • *
  • {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR} specifies a performance query.
  • *
  • {@link EXTTransformFeedback#VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT} specifies a transform feedback query.
  • *
  • {@link KHRAccelerationStructure#VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR} specifies a acceleration structure size query for use with {@link KHRAccelerationStructure#vkCmdWriteAccelerationStructuresPropertiesKHR CmdWriteAccelerationStructuresPropertiesKHR} or {@link KHRAccelerationStructure#vkWriteAccelerationStructuresPropertiesKHR WriteAccelerationStructuresPropertiesKHR}.
  • *
  • {@link KHRAccelerationStructure#VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR} specifies a serialization acceleration structure size query
  • *
  • {@link NVRayTracing#VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV} specifies a acceleration structure size query for use with {@link NVRayTracing#vkCmdWriteAccelerationStructuresPropertiesNV CmdWriteAccelerationStructuresPropertiesNV}.
  • *
  • {@link INTELPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL QUERY_TYPE_PERFORMANCE_QUERY_INTEL} specifies a Intel performance query.
  • *
  • {@link KHRVideoQueue#VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR QUERY_TYPE_RESULT_STATUS_ONLY_KHR} specifies a result status query.
  • *
  • {@link KHRVideoEncodeQueue#VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR} specifies a video encode bitstream range query.
  • *
* *
See Also
* *

{@link VkQueryPoolCreateInfo}, {@link KHRAccelerationStructure#vkCmdWriteAccelerationStructuresPropertiesKHR CmdWriteAccelerationStructuresPropertiesKHR}, {@link NVRayTracing#vkCmdWriteAccelerationStructuresPropertiesNV CmdWriteAccelerationStructuresPropertiesNV}, {@link KHRAccelerationStructure#vkWriteAccelerationStructuresPropertiesKHR WriteAccelerationStructuresPropertiesKHR}

*/ public static final int VK_QUERY_TYPE_OCCLUSION = 0, VK_QUERY_TYPE_PIPELINE_STATISTICS = 1, VK_QUERY_TYPE_TIMESTAMP = 2; /** * VkQueryResultFlagBits - Bitmask specifying how and when query results are returned * *
Description
* *
    *
  • {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} specifies the results will be written as an array of 64-bit unsigned integer values. If this bit is not set, the results will be written as an array of 32-bit unsigned integer values.
  • *
  • {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} specifies that Vulkan will wait for each query’s status to become available before retrieving its results.
  • *
  • {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} specifies that the availability status accompanies the results.
  • *
  • {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} specifies that returning partial results is acceptable.
  • *
  • {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} specifies that the last value returned in the query is a {@code VkQueryResultStatusKHR} value.
  • *
*/ public static final int VK_QUERY_RESULT_64_BIT = 0x1, VK_QUERY_RESULT_WAIT_BIT = 0x2, VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x4, VK_QUERY_RESULT_PARTIAL_BIT = 0x8; /** * VkBufferCreateFlagBits - Bitmask specifying additional parameters of a buffer * *
Description
* *
    *
  • {@link #VK_BUFFER_CREATE_SPARSE_BINDING_BIT BUFFER_CREATE_SPARSE_BINDING_BIT} specifies that the buffer will be backed using sparse memory binding.
  • *
  • {@link #VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} specifies that the buffer can be partially backed using sparse memory binding. Buffers created with this flag must also be created with the {@link #VK_BUFFER_CREATE_SPARSE_BINDING_BIT BUFFER_CREATE_SPARSE_BINDING_BIT} flag.
  • *
  • {@link #VK_BUFFER_CREATE_SPARSE_ALIASED_BIT BUFFER_CREATE_SPARSE_ALIASED_BIT} specifies that the buffer will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another buffer (or another portion of the same buffer). Buffers created with this flag must also be created with the {@link #VK_BUFFER_CREATE_SPARSE_BINDING_BIT BUFFER_CREATE_SPARSE_BINDING_BIT} flag.
  • *
  • {@link VK11#VK_BUFFER_CREATE_PROTECTED_BIT BUFFER_CREATE_PROTECTED_BIT} specifies that the buffer is a protected buffer.
  • *
  • {@link VK12#VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT} specifies that the buffer’s address can be saved and reused on a subsequent run (e.g. for trace capture and replay), see {@link VkBufferOpaqueCaptureAddressCreateInfo} for more detail.
  • *
* *

See Sparse Resource Features and Physical Device Features for details of the sparse memory features supported on a device.

*/ public static final int VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x1, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x2, VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x4; /** * VkBufferUsageFlagBits - Bitmask specifying allowed usage of a buffer * *
Description
* *
    *
  • {@link #VK_BUFFER_USAGE_TRANSFER_SRC_BIT BUFFER_USAGE_TRANSFER_SRC_BIT} specifies that the buffer can be used as the source of a transfer command (see the definition of {@link #VK_PIPELINE_STAGE_TRANSFER_BIT PIPELINE_STAGE_TRANSFER_BIT}).
  • *
  • {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} specifies that the buffer can be used as the destination of a transfer command.
  • *
  • {@link #VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT} specifies that the buffer can be used to create a {@code VkBufferView} suitable for occupying a {@code VkDescriptorSet} slot of type {@link #VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER}.
  • *
  • {@link #VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT} specifies that the buffer can be used to create a {@code VkBufferView} suitable for occupying a {@code VkDescriptorSet} slot of type {@link #VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER}.
  • *
  • {@link #VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT BUFFER_USAGE_UNIFORM_BUFFER_BIT} specifies that the buffer can be used in a {@link VkDescriptorBufferInfo} suitable for occupying a {@code VkDescriptorSet} slot either of type {@link #VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER DESCRIPTOR_TYPE_UNIFORM_BUFFER} or {@link #VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC}.
  • *
  • {@link #VK_BUFFER_USAGE_STORAGE_BUFFER_BIT BUFFER_USAGE_STORAGE_BUFFER_BIT} specifies that the buffer can be used in a {@link VkDescriptorBufferInfo} suitable for occupying a {@code VkDescriptorSet} slot either of type {@link #VK_DESCRIPTOR_TYPE_STORAGE_BUFFER DESCRIPTOR_TYPE_STORAGE_BUFFER} or {@link #VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC}.
  • *
  • {@link #VK_BUFFER_USAGE_INDEX_BUFFER_BIT BUFFER_USAGE_INDEX_BUFFER_BIT} specifies that the buffer is suitable for passing as the {@code buffer} parameter to {@link #vkCmdBindIndexBuffer CmdBindIndexBuffer}.
  • *
  • {@link #VK_BUFFER_USAGE_VERTEX_BUFFER_BIT BUFFER_USAGE_VERTEX_BUFFER_BIT} specifies that the buffer is suitable for passing as an element of the {@code pBuffers} array to {@link #vkCmdBindVertexBuffers CmdBindVertexBuffers}.
  • *
  • {@link #VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT BUFFER_USAGE_INDIRECT_BUFFER_BIT} specifies that the buffer is suitable for passing as the {@code buffer} parameter to {@link #vkCmdDrawIndirect CmdDrawIndirect}, {@link #vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect}, {@link NVMeshShader#vkCmdDrawMeshTasksIndirectNV CmdDrawMeshTasksIndirectNV}, {@link NVMeshShader#vkCmdDrawMeshTasksIndirectCountNV CmdDrawMeshTasksIndirectCountNV}, or {@link #vkCmdDispatchIndirect CmdDispatchIndirect}. It is also suitable for passing as the {@code buffer} member of {@link VkIndirectCommandsStreamNV}, or {@code sequencesCountBuffer} or {@code sequencesIndexBuffer} or {@code preprocessedBuffer} member of {@link VkGeneratedCommandsInfoNV}
  • *
  • {@link EXTConditionalRendering#VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT} specifies that the buffer is suitable for passing as the {@code buffer} parameter to {@link EXTConditionalRendering#vkCmdBeginConditionalRenderingEXT CmdBeginConditionalRenderingEXT}.
  • *
  • {@link EXTTransformFeedback#VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT} specifies that the buffer is suitable for using for binding as a transform feedback buffer with {@link EXTTransformFeedback#vkCmdBindTransformFeedbackBuffersEXT CmdBindTransformFeedbackBuffersEXT}.
  • *
  • {@link EXTTransformFeedback#VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT} specifies that the buffer is suitable for using as a counter buffer with {@link EXTTransformFeedback#vkCmdBeginTransformFeedbackEXT CmdBeginTransformFeedbackEXT} and {@link EXTTransformFeedback#vkCmdEndTransformFeedbackEXT CmdEndTransformFeedbackEXT}.
  • *
  • {@link NVRayTracing#VK_BUFFER_USAGE_RAY_TRACING_BIT_NV BUFFER_USAGE_RAY_TRACING_BIT_NV} specifies that the buffer is suitable for use in {@link NVRayTracing#vkCmdTraceRaysNV CmdTraceRaysNV}.
  • *
  • {@link KHRRayTracingPipeline#VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR} specifies that the buffer is suitable for use as a Shader Binding Table.
  • *
  • {@link KHRAccelerationStructure#VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR} specifies that the buffer is suitable for use as a read-only input to an acceleration structure build.
  • *
  • {@link KHRAccelerationStructure#VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR} specifies that the buffer is suitable for storage space for a {@code VkAccelerationStructureKHR}.
  • *
  • {@link VK12#VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT} specifies that the buffer can be used to retrieve a buffer device address via {@link VK12#vkGetBufferDeviceAddress GetBufferDeviceAddress} and use that address to access the buffer’s memory from a shader.
  • *
  • {@link KHRVideoDecodeQueue#VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR} specifies that the buffer can be used as the source bitstream buffer in a video decode operation.
  • *
  • {@link KHRVideoDecodeQueue#VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR} specifies that the buffer can be used as the destination status buffer in a video decode operation.
  • *
  • {@link KHRVideoEncodeQueue#VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR} specifies that the buffer can be used as the destination bitstream buffer in a video encode operation.
  • *
  • {@link KHRVideoEncodeQueue#VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR} specifies that the buffer can be used as the destination status buffer in a video encode operation.
  • *
*/ public static final int VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x1, VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x2, VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x4, VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x8, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x10, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x20, VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x40, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x80, VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x100; /** * VkSharingMode - Buffer and image sharing modes * *
Description
* *
    *
  • {@link #VK_SHARING_MODE_EXCLUSIVE SHARING_MODE_EXCLUSIVE} specifies that access to any range or image subresource of the object will be exclusive to a single queue family at a time.
  • *
  • {@link #VK_SHARING_MODE_CONCURRENT SHARING_MODE_CONCURRENT} specifies that concurrent access to any range or image subresource of the object from multiple queue families is supported.
  • *
* *
Note
* *

{@link #VK_SHARING_MODE_CONCURRENT SHARING_MODE_CONCURRENT} may result in lower performance access to the buffer or image than {@link #VK_SHARING_MODE_EXCLUSIVE SHARING_MODE_EXCLUSIVE}.

*
* *

Ranges of buffers and image subresources of image objects created using {@link #VK_SHARING_MODE_EXCLUSIVE SHARING_MODE_EXCLUSIVE} must only be accessed by queues in the queue family that has ownership of the resource. Upon creation, such resources are not owned by any queue family; ownership is implicitly acquired upon first use within a queue. Once a resource using {@link #VK_SHARING_MODE_EXCLUSIVE SHARING_MODE_EXCLUSIVE} is owned by some queue family, the application must perform a queue family ownership transfer to make the memory contents of a range or image subresource accessible to a different queue family.

* *
Note
* *

Images still require a layout transition from {@link #VK_IMAGE_LAYOUT_UNDEFINED IMAGE_LAYOUT_UNDEFINED} or {@link #VK_IMAGE_LAYOUT_PREINITIALIZED IMAGE_LAYOUT_PREINITIALIZED} before being used on the first queue.

*
* *

A queue family can take ownership of an image subresource or buffer range of a resource created with {@link #VK_SHARING_MODE_EXCLUSIVE SHARING_MODE_EXCLUSIVE}, without an ownership transfer, in the same way as for a resource that was just created; however, taking ownership in this way has the effect that the contents of the image subresource or buffer range are undefined.

* *

Ranges of buffers and image subresources of image objects created using {@link #VK_SHARING_MODE_CONCURRENT SHARING_MODE_CONCURRENT} must only be accessed by queues from the queue families specified through the {@code queueFamilyIndexCount} and {@code pQueueFamilyIndices} members of the corresponding create info structures.

* *
See Also
* *

{@link VkBufferCreateInfo}, {@link VkImageCreateInfo}, {@link VkPhysicalDeviceImageDrmFormatModifierInfoEXT}, {@link VkSwapchainCreateInfoKHR}

*/ public static final int VK_SHARING_MODE_EXCLUSIVE = 0, VK_SHARING_MODE_CONCURRENT = 1; /** * VkComponentSwizzle - Specify how a component is swizzled * *
Description
* *
    *
  • {@link #VK_COMPONENT_SWIZZLE_IDENTITY COMPONENT_SWIZZLE_IDENTITY} specifies that the component is set to the identity swizzle.
  • *
  • {@link #VK_COMPONENT_SWIZZLE_ZERO COMPONENT_SWIZZLE_ZERO} specifies that the component is set to zero.
  • *
  • {@link #VK_COMPONENT_SWIZZLE_ONE COMPONENT_SWIZZLE_ONE} specifies that the component is set to either 1 or 1.0, depending on whether the type of the image view format is integer or floating-point respectively, as determined by the Format Definition section for each {@code VkFormat}.
  • *
  • {@link #VK_COMPONENT_SWIZZLE_R COMPONENT_SWIZZLE_R} specifies that the component is set to the value of the R component of the image.
  • *
  • {@link #VK_COMPONENT_SWIZZLE_G COMPONENT_SWIZZLE_G} specifies that the component is set to the value of the G component of the image.
  • *
  • {@link #VK_COMPONENT_SWIZZLE_B COMPONENT_SWIZZLE_B} specifies that the component is set to the value of the B component of the image.
  • *
  • {@link #VK_COMPONENT_SWIZZLE_A COMPONENT_SWIZZLE_A} specifies that the component is set to the value of the A component of the image.
  • *
* *

Setting the identity swizzle on a component is equivalent to setting the identity mapping on that component. That is:

* *
Component Mappings Equivalent To {@link #VK_COMPONENT_SWIZZLE_IDENTITY COMPONENT_SWIZZLE_IDENTITY}
* * * * * * * * * *
ComponentIdentity Mapping
{@code components.r}{@link #VK_COMPONENT_SWIZZLE_R COMPONENT_SWIZZLE_R}
{@code components.g}{@link #VK_COMPONENT_SWIZZLE_G COMPONENT_SWIZZLE_G}
{@code components.b}{@link #VK_COMPONENT_SWIZZLE_B COMPONENT_SWIZZLE_B}
{@code components.a}{@link #VK_COMPONENT_SWIZZLE_A COMPONENT_SWIZZLE_A}
* *
See Also
* *

{@link VkComponentMapping}

*/ public static final int VK_COMPONENT_SWIZZLE_IDENTITY = 0, VK_COMPONENT_SWIZZLE_ZERO = 1, VK_COMPONENT_SWIZZLE_ONE = 2, VK_COMPONENT_SWIZZLE_R = 3, VK_COMPONENT_SWIZZLE_G = 4, VK_COMPONENT_SWIZZLE_B = 5, VK_COMPONENT_SWIZZLE_A = 6; /** * VkImageViewType - Image view types * *
See Also
* *

{@link VkImageViewCreateInfo}, {@link VkPhysicalDeviceImageViewImageFormatInfoEXT}

* *
Enum values:
* *
    *
  • {@link #VK_IMAGE_VIEW_TYPE_1D IMAGE_VIEW_TYPE_1D}
  • *
  • {@link #VK_IMAGE_VIEW_TYPE_2D IMAGE_VIEW_TYPE_2D}
  • *
  • {@link #VK_IMAGE_VIEW_TYPE_3D IMAGE_VIEW_TYPE_3D}
  • *
  • {@link #VK_IMAGE_VIEW_TYPE_CUBE IMAGE_VIEW_TYPE_CUBE}
  • *
  • {@link #VK_IMAGE_VIEW_TYPE_1D_ARRAY IMAGE_VIEW_TYPE_1D_ARRAY}
  • *
  • {@link #VK_IMAGE_VIEW_TYPE_2D_ARRAY IMAGE_VIEW_TYPE_2D_ARRAY}
  • *
  • {@link #VK_IMAGE_VIEW_TYPE_CUBE_ARRAY IMAGE_VIEW_TYPE_CUBE_ARRAY}
  • *
*/ public static final int VK_IMAGE_VIEW_TYPE_1D = 0, VK_IMAGE_VIEW_TYPE_2D = 1, VK_IMAGE_VIEW_TYPE_3D = 2, VK_IMAGE_VIEW_TYPE_CUBE = 3, VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4, VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5, VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6; /** * VkBlendFactor - Framebuffer blending factors * *
Description
* *

The semantics of the enum values are described in the table below:

* *
Blend Factors
* * * * * * * * * * * * * * * * * * * * * * * * *
{@code VkBlendFactor}RGB Blend Factors (Sr,Sg,Sb) or (Dr,Dg,Db)Alpha Blend Factor (Sa or Da)
{@link #VK_BLEND_FACTOR_ZERO BLEND_FACTOR_ZERO}(0,0,0)0
{@link #VK_BLEND_FACTOR_ONE BLEND_FACTOR_ONE}(1,1,1)1
{@link #VK_BLEND_FACTOR_SRC_COLOR BLEND_FACTOR_SRC_COLOR}(Rs0,Gs0,Bs0)As0
{@link #VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR BLEND_FACTOR_ONE_MINUS_SRC_COLOR}(1-Rs0,1-Gs0,1-Bs0)1-As0
{@link #VK_BLEND_FACTOR_DST_COLOR BLEND_FACTOR_DST_COLOR}(Rd,Gd,Bd)Ad
{@link #VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR BLEND_FACTOR_ONE_MINUS_DST_COLOR}(1-Rd,1-Gd,1-Bd)1-Ad
{@link #VK_BLEND_FACTOR_SRC_ALPHA BLEND_FACTOR_SRC_ALPHA}(As0,As0,As0)As0
{@link #VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA BLEND_FACTOR_ONE_MINUS_SRC_ALPHA}(1-As0,1-As0,1-As0)1-As0
{@link #VK_BLEND_FACTOR_DST_ALPHA BLEND_FACTOR_DST_ALPHA}(Ad,Ad,Ad)Ad
{@link #VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA BLEND_FACTOR_ONE_MINUS_DST_ALPHA}(1-Ad,1-Ad,1-Ad)1-Ad
{@link #VK_BLEND_FACTOR_CONSTANT_COLOR BLEND_FACTOR_CONSTANT_COLOR}(Rc,Gc,Bc)Ac
{@link #VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR}(1-Rc,1-Gc,1-Bc)1-Ac
{@link #VK_BLEND_FACTOR_CONSTANT_ALPHA BLEND_FACTOR_CONSTANT_ALPHA}(Ac,Ac,Ac)Ac
{@link #VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA}(1-Ac,1-Ac,1-Ac)1-Ac
{@link #VK_BLEND_FACTOR_SRC_ALPHA_SATURATE BLEND_FACTOR_SRC_ALPHA_SATURATE}(f,f,f); f = min(As0,1-Ad)1
{@link #VK_BLEND_FACTOR_SRC1_COLOR BLEND_FACTOR_SRC1_COLOR}(Rs1,Gs1,Bs1)As1
{@link #VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR BLEND_FACTOR_ONE_MINUS_SRC1_COLOR}(1-Rs1,1-Gs1,1-Bs1)1-As1
{@link #VK_BLEND_FACTOR_SRC1_ALPHA BLEND_FACTOR_SRC1_ALPHA}(As1,As1,As1)As1
{@link #VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA}(1-As1,1-As1,1-As1)1-As1
* *

In this table, the following conventions are used:

* *
    *
  • Rs0,Gs0,Bs0 and As0 represent the first source color R, G, B, and A components, respectively, for the fragment output location corresponding to the color attachment being blended.
  • *
  • Rs1,Gs1,Bs1 and As1 represent the second source color R, G, B, and A components, respectively, used in dual source blending modes, for the fragment output location corresponding to the color attachment being blended.
  • *
  • Rd,Gd,Bd and Ad represent the R, G, B, and A components of the destination color. That is, the color currently in the corresponding color attachment for this fragment/sample.
  • *
  • Rc,Gc,Bc and Ac represent the blend constant R, G, B, and A components, respectively.
  • *
* *
See Also
* *

{@link VkPipelineColorBlendAttachmentState}

*/ public static final int VK_BLEND_FACTOR_ZERO = 0, VK_BLEND_FACTOR_ONE = 1, VK_BLEND_FACTOR_SRC_COLOR = 2, VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3, VK_BLEND_FACTOR_DST_COLOR = 4, VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5, VK_BLEND_FACTOR_SRC_ALPHA = 6, VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7, VK_BLEND_FACTOR_DST_ALPHA = 8, VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9, VK_BLEND_FACTOR_CONSTANT_COLOR = 10, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11, VK_BLEND_FACTOR_CONSTANT_ALPHA = 12, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13, VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14, VK_BLEND_FACTOR_SRC1_COLOR = 15, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16, VK_BLEND_FACTOR_SRC1_ALPHA = 17, VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18; /** * VkBlendOp - Framebuffer blending operations * *
Description
* *

The semantics of the basic blend operations are described in the table below:

* *
Basic Blend Operations
* * * * * * * * * * *
{@code VkBlendOp}RGB ComponentsAlpha Component
{@link #VK_BLEND_OP_ADD BLEND_OP_ADD}R = Rs0 × Sr + Rd × Dr G = Gs0 × Sg + Gd × Dg B = Bs0 × Sb + Bd × DbA = As0 × Sa + Ad × Da
{@link #VK_BLEND_OP_SUBTRACT BLEND_OP_SUBTRACT}R = Rs0 × Sr - Rd × Dr G = Gs0 × Sg - Gd × Dg B = Bs0 × Sb - Bd × DbA = As0 × Sa - Ad × Da
{@link #VK_BLEND_OP_REVERSE_SUBTRACT BLEND_OP_REVERSE_SUBTRACT}R = Rd × Dr - Rs0 × Sr G = Gd × Dg - Gs0 × Sg B = Bd × Db - Bs0 × SbA = Ad × Da - As0 × Sa
{@link #VK_BLEND_OP_MIN BLEND_OP_MIN}R = min(Rs0,Rd) G = min(Gs0,Gd) B = min(Bs0,Bd)A = min(As0,Ad)
{@link #VK_BLEND_OP_MAX BLEND_OP_MAX}R = max(Rs0,Rd) G = max(Gs0,Gd) B = max(Bs0,Bd)A = max(As0,Ad)
* *

In this table, the following conventions are used:

* *
    *
  • Rs0, Gs0, Bs0 and As0 represent the first source color R, G, B, and A components, respectively.
  • *
  • Rd, Gd, Bd and Ad represent the R, G, B, and A components of the destination color. That is, the color currently in the corresponding color attachment for this fragment/sample.
  • *
  • Sr, Sg, Sb and Sa represent the source blend factor R, G, B, and A components, respectively.
  • *
  • Dr, Dg, Db and Da represent the destination blend factor R, G, B, and A components, respectively.
  • *
* *

The blending operation produces a new set of values R, G, B and A, which are written to the framebuffer attachment. If blending is not enabled for this attachment, then R, G, B and A are assigned Rs0, Gs0, Bs0 and As0, respectively.

* *

If the color attachment is fixed-point, the components of the source and destination values and blend factors are each clamped to [0,1] or [-1,1] respectively for an unsigned normalized or signed normalized color attachment prior to evaluating the blend operations. If the color attachment is floating-point, no clamping occurs.

* *
See Also
* *

{@link VkPipelineColorBlendAttachmentState}

*/ public static final int VK_BLEND_OP_ADD = 0, VK_BLEND_OP_SUBTRACT = 1, VK_BLEND_OP_REVERSE_SUBTRACT = 2, VK_BLEND_OP_MIN = 3, VK_BLEND_OP_MAX = 4; /** * VkColorComponentFlagBits - Bitmask controlling which components are written to the framebuffer * *
Description
* *
    *
  • {@link #VK_COLOR_COMPONENT_R_BIT COLOR_COMPONENT_R_BIT} specifies that the R value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.
  • *
  • {@link #VK_COLOR_COMPONENT_G_BIT COLOR_COMPONENT_G_BIT} specifies that the G value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.
  • *
  • {@link #VK_COLOR_COMPONENT_B_BIT COLOR_COMPONENT_B_BIT} specifies that the B value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.
  • *
  • {@link #VK_COLOR_COMPONENT_A_BIT COLOR_COMPONENT_A_BIT} specifies that the A value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.
  • *
* *

The color write mask operation is applied regardless of whether blending is enabled.

* *

The color write mask operation is applied only if Color Write Enable is enabled for the respective attachment. Otherwise the color write mask is ignored and writes to all components of the attachment are disabled.

*/ public static final int VK_COLOR_COMPONENT_R_BIT = 0x1, VK_COLOR_COMPONENT_G_BIT = 0x2, VK_COLOR_COMPONENT_B_BIT = 0x4, VK_COLOR_COMPONENT_A_BIT = 0x8; /** * VkCompareOp - Stencil comparison function * *
Description
* *
    *
  • {@link #VK_COMPARE_OP_NEVER COMPARE_OP_NEVER} specifies that the test evaluates to false.
  • *
  • {@link #VK_COMPARE_OP_LESS COMPARE_OP_LESS} specifies that the test evaluates A < B.
  • *
  • {@link #VK_COMPARE_OP_EQUAL COMPARE_OP_EQUAL} specifies that the test evaluates A = B.
  • *
  • {@link #VK_COMPARE_OP_LESS_OR_EQUAL COMPARE_OP_LESS_OR_EQUAL} specifies that the test evaluates A ≤ B.
  • *
  • {@link #VK_COMPARE_OP_GREATER COMPARE_OP_GREATER} specifies that the test evaluates A > B.
  • *
  • {@link #VK_COMPARE_OP_NOT_EQUAL COMPARE_OP_NOT_EQUAL} specifies that the test evaluates A ≠ B.
  • *
  • {@link #VK_COMPARE_OP_GREATER_OR_EQUAL COMPARE_OP_GREATER_OR_EQUAL} specifies that the test evaluates A ≥ B.
  • *
  • {@link #VK_COMPARE_OP_ALWAYS COMPARE_OP_ALWAYS} specifies that the test evaluates to true.
  • *
* *
See Also
* *

{@link VkPipelineDepthStencilStateCreateInfo}, {@link VkSamplerCreateInfo}, {@link VkStencilOpState}, {@link EXTExtendedDynamicState#vkCmdSetDepthCompareOpEXT CmdSetDepthCompareOpEXT}, {@link EXTExtendedDynamicState#vkCmdSetStencilOpEXT CmdSetStencilOpEXT}

*/ public static final int VK_COMPARE_OP_NEVER = 0, VK_COMPARE_OP_LESS = 1, VK_COMPARE_OP_EQUAL = 2, VK_COMPARE_OP_LESS_OR_EQUAL = 3, VK_COMPARE_OP_GREATER = 4, VK_COMPARE_OP_NOT_EQUAL = 5, VK_COMPARE_OP_GREATER_OR_EQUAL = 6, VK_COMPARE_OP_ALWAYS = 7; /** * VkPipelineCreateFlagBits - Bitmask controlling how a pipeline is created * *
Description
* *
    *
  • {@link #VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT} specifies that the created pipeline will not be optimized. Using this flag may reduce the time taken to create the pipeline.
  • *
  • {@link #VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT} specifies that the pipeline to be created is allowed to be the parent of a pipeline that will be created in a subsequent pipeline creation call.
  • *
  • {@link #VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT} specifies that the pipeline to be created will be a child of a previously created parent pipeline.
  • *
  • {@link VK11#VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT} specifies that any shader input variables decorated as {@code ViewIndex} will be assigned values as if they were decorated as {@code DeviceIndex}.
  • *
  • {@link VK11#VK_PIPELINE_CREATE_DISPATCH_BASE PIPELINE_CREATE_DISPATCH_BASE} specifies that a compute pipeline can be used with {@link VK11#vkCmdDispatchBase CmdDispatchBase} with a non-zero base workgroup.
  • *
  • {@link NVRayTracing#VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV PIPELINE_CREATE_DEFER_COMPILE_BIT_NV} specifies that a pipeline is created with all shaders in the deferred state. Before using the pipeline the application must call {@link NVRayTracing#vkCompileDeferredNV CompileDeferredNV} exactly once on each shader in the pipeline before using the pipeline.
  • *
  • {@link KHRPipelineExecutableProperties#VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR} specifies that the shader compiler should capture statistics for the pipeline executables produced by the compile process which can later be retrieved by calling {@link KHRPipelineExecutableProperties#vkGetPipelineExecutableStatisticsKHR GetPipelineExecutableStatisticsKHR}. Enabling this flag must not affect the final compiled pipeline but may disable pipeline caching or otherwise affect pipeline creation time.
  • *
  • {@link KHRPipelineExecutableProperties#VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR} specifies that the shader compiler should capture the internal representations of pipeline executables produced by the compile process which can later be retrieved by calling {@link KHRPipelineExecutableProperties#vkGetPipelineExecutableInternalRepresentationsKHR GetPipelineExecutableInternalRepresentationsKHR}. Enabling this flag must not affect the final compiled pipeline but may disable pipeline caching or otherwise affect pipeline creation time.
  • *
  • {@link KHRPipelineLibrary#VK_PIPELINE_CREATE_LIBRARY_BIT_KHR PIPELINE_CREATE_LIBRARY_BIT_KHR} specifies that the pipeline cannot be used directly, and instead defines a pipeline library that can be combined with other pipelines using the {@link VkPipelineLibraryCreateInfoKHR} structure. This is available in ray tracing pipelines.
  • *
  • {@link KHRRayTracingPipeline#VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR} specifies that an any-hit shader will always be present when an any-hit shader would be executed. A NULL any-hit shader is an any-hit shader which is effectively {@link KHRRayTracingPipeline#VK_SHADER_UNUSED_KHR SHADER_UNUSED_KHR}, such as from a shader group consisting entirely of zeros.
  • *
  • {@link KHRRayTracingPipeline#VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR} specifies that a closest hit shader will always be present when a closest hit shader would be executed. A NULL closest hit shader is a closest hit shader which is effectively {@link KHRRayTracingPipeline#VK_SHADER_UNUSED_KHR SHADER_UNUSED_KHR}, such as from a shader group consisting entirely of zeros.
  • *
  • {@link KHRRayTracingPipeline#VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR} specifies that a miss shader will always be present when a miss shader would be executed. A NULL miss shader is a miss shader which is effectively {@link KHRRayTracingPipeline#VK_SHADER_UNUSED_KHR SHADER_UNUSED_KHR}, such as from a shader group consisting entirely of zeros.
  • *
  • {@link KHRRayTracingPipeline#VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR} specifies that an intersection shader will always be present when an intersection shader would be executed. A NULL intersection shader is an intersection shader which is effectively {@link KHRRayTracingPipeline#VK_SHADER_UNUSED_KHR SHADER_UNUSED_KHR}, such as from a shader group consisting entirely of zeros.
  • *
  • {@link KHRRayTracingPipeline#VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR} specifies that triangle primitives will be skipped during traversal using {@code OpTraceRayKHR}.
  • *
  • {@link KHRRayTracingPipeline#VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR} specifies that AABB primitives will be skipped during traversal using {@code OpTraceRayKHR}.
  • *
  • {@link KHRRayTracingPipeline#VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR} specifies that the shader group handles can be saved and reused on a subsequent run (e.g. for trace capture and replay).
  • *
  • {@link NVDeviceGeneratedCommands#VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV} specifies that the pipeline can be used in combination with Device-Generated Commands.
  • *
  • {@link EXTPipelineCreationCacheControl#VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT} specifies that pipeline creation will fail if a compile is required for creation of a valid {@code VkPipeline} object; {@link EXTPipelineCreationCacheControl#VK_PIPELINE_COMPILE_REQUIRED_EXT PIPELINE_COMPILE_REQUIRED_EXT} will be returned by pipeline creation, and the {@code VkPipeline} will be set to {@link #VK_NULL_HANDLE NULL_HANDLE}.
  • *
  • When creating multiple pipelines, {@link EXTPipelineCreationCacheControl#VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT} specifies that control will be returned to the application on failure of the corresponding pipeline rather than continuing to create additional pipelines.
  • *
  • {@link NVRayTracingMotionBlur#VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV} specifies that the pipeline is allowed to use {@code OpTraceRayMotionNV}.
  • *
  • {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR} specifies that the pipeline will be used with a fragment shading rate attachment.
  • *
  • {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT} specifies that the pipeline will be used with a fragment density map attachment.
  • *
* *

It is valid to set both {@link #VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT} and {@link #VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT}. This allows a pipeline to be both a parent and possibly a child in a pipeline hierarchy. See Pipeline Derivatives for more information.

*/ public static final int VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x1, VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x2, VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x4; /** * VkShaderStageFlagBits - Bitmask specifying a pipeline stage * *
Description
* *
    *
  • {@link #VK_SHADER_STAGE_VERTEX_BIT SHADER_STAGE_VERTEX_BIT} specifies the vertex stage.
  • *
  • {@link #VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT SHADER_STAGE_TESSELLATION_CONTROL_BIT} specifies the tessellation control stage.
  • *
  • {@link #VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT SHADER_STAGE_TESSELLATION_EVALUATION_BIT} specifies the tessellation evaluation stage.
  • *
  • {@link #VK_SHADER_STAGE_GEOMETRY_BIT SHADER_STAGE_GEOMETRY_BIT} specifies the geometry stage.
  • *
  • {@link #VK_SHADER_STAGE_FRAGMENT_BIT SHADER_STAGE_FRAGMENT_BIT} specifies the fragment stage.
  • *
  • {@link #VK_SHADER_STAGE_COMPUTE_BIT SHADER_STAGE_COMPUTE_BIT} specifies the compute stage.
  • *
  • {@link #VK_SHADER_STAGE_ALL_GRAPHICS SHADER_STAGE_ALL_GRAPHICS} is a combination of bits used as shorthand to specify all graphics stages defined above (excluding the compute stage).
  • *
  • {@link #VK_SHADER_STAGE_ALL SHADER_STAGE_ALL} is a combination of bits used as shorthand to specify all shader stages supported by the device, including all additional stages which are introduced by extensions.
  • *
  • {@link NVMeshShader#VK_SHADER_STAGE_TASK_BIT_NV SHADER_STAGE_TASK_BIT_NV} specifies the task stage.
  • *
  • {@link NVMeshShader#VK_SHADER_STAGE_MESH_BIT_NV SHADER_STAGE_MESH_BIT_NV} specifies the mesh stage.
  • *
  • {@link KHRRayTracingPipeline#VK_SHADER_STAGE_RAYGEN_BIT_KHR SHADER_STAGE_RAYGEN_BIT_KHR} specifies the ray generation stage.
  • *
  • {@link KHRRayTracingPipeline#VK_SHADER_STAGE_ANY_HIT_BIT_KHR SHADER_STAGE_ANY_HIT_BIT_KHR} specifies the any-hit stage.
  • *
  • {@link KHRRayTracingPipeline#VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR SHADER_STAGE_CLOSEST_HIT_BIT_KHR} specifies the closest hit stage.
  • *
  • {@link KHRRayTracingPipeline#VK_SHADER_STAGE_MISS_BIT_KHR SHADER_STAGE_MISS_BIT_KHR} specifies the miss stage.
  • *
  • {@link KHRRayTracingPipeline#VK_SHADER_STAGE_INTERSECTION_BIT_KHR SHADER_STAGE_INTERSECTION_BIT_KHR} specifies the intersection stage.
  • *
  • {@link KHRRayTracingPipeline#VK_SHADER_STAGE_CALLABLE_BIT_KHR SHADER_STAGE_CALLABLE_BIT_KHR} specifies the callable stage.
  • *
* *
Note
* *

{@link #VK_SHADER_STAGE_ALL_GRAPHICS SHADER_STAGE_ALL_GRAPHICS} only includes the original five graphics stages included in Vulkan 1.0, and not any stages added by extensions. Thus, it may not have the desired effect in all cases.

*
* *
See Also
* *

{@link VkPipelineShaderStageCreateInfo}, {@link AMDShaderInfo#vkGetShaderInfoAMD GetShaderInfoAMD}

*/ public static final int VK_SHADER_STAGE_VERTEX_BIT = 0x1, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x2, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x4, VK_SHADER_STAGE_GEOMETRY_BIT = 0x8, VK_SHADER_STAGE_FRAGMENT_BIT = 0x10, VK_SHADER_STAGE_COMPUTE_BIT = 0x20, VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, VK_SHADER_STAGE_ALL = 0x7FFFFFFF; /** * VkCullModeFlagBits - Bitmask controlling triangle culling * *
Description
* *
    *
  • {@link #VK_CULL_MODE_NONE CULL_MODE_NONE} specifies that no triangles are discarded
  • *
  • {@link #VK_CULL_MODE_FRONT_BIT CULL_MODE_FRONT_BIT} specifies that front-facing triangles are discarded
  • *
  • {@link #VK_CULL_MODE_BACK_BIT CULL_MODE_BACK_BIT} specifies that back-facing triangles are discarded
  • *
  • {@link #VK_CULL_MODE_FRONT_AND_BACK CULL_MODE_FRONT_AND_BACK} specifies that all triangles are discarded.
  • *
* *

Following culling, fragments are produced for any triangles which have not been discarded.

*/ public static final int VK_CULL_MODE_NONE = 0, VK_CULL_MODE_FRONT_BIT = 0x1, VK_CULL_MODE_BACK_BIT = 0x2, VK_CULL_MODE_FRONT_AND_BACK = 0x00000003; /** * VkDynamicState - Indicate which dynamic state is taken from dynamic state commands * *
Description
* *
    *
  • {@link #VK_DYNAMIC_STATE_VIEWPORT DYNAMIC_STATE_VIEWPORT} specifies that the {@code pViewports} state in {@link VkPipelineViewportStateCreateInfo} will be ignored and must be set dynamically with {@link #vkCmdSetViewport CmdSetViewport} before any drawing commands. The number of viewports used by a pipeline is still specified by the {@code viewportCount} member of {@link VkPipelineViewportStateCreateInfo}.
  • *
  • {@link #VK_DYNAMIC_STATE_SCISSOR DYNAMIC_STATE_SCISSOR} specifies that the {@code pScissors} state in {@link VkPipelineViewportStateCreateInfo} will be ignored and must be set dynamically with {@link #vkCmdSetScissor CmdSetScissor} before any drawing commands. The number of scissor rectangles used by a pipeline is still specified by the {@code scissorCount} member of {@link VkPipelineViewportStateCreateInfo}.
  • *
  • {@link #VK_DYNAMIC_STATE_LINE_WIDTH DYNAMIC_STATE_LINE_WIDTH} specifies that the {@code lineWidth} state in {@link VkPipelineRasterizationStateCreateInfo} will be ignored and must be set dynamically with {@link #vkCmdSetLineWidth CmdSetLineWidth} before any drawing commands that generate line primitives for the rasterizer.
  • *
  • {@link #VK_DYNAMIC_STATE_DEPTH_BIAS DYNAMIC_STATE_DEPTH_BIAS} specifies that the {@code depthBiasConstantFactor}, {@code depthBiasClamp} and {@code depthBiasSlopeFactor} states in {@link VkPipelineRasterizationStateCreateInfo} will be ignored and must be set dynamically with {@link #vkCmdSetDepthBias CmdSetDepthBias} before any draws are performed with {@code depthBiasEnable} in {@link VkPipelineRasterizationStateCreateInfo} set to {@link #VK_TRUE TRUE}.
  • *
  • {@link #VK_DYNAMIC_STATE_BLEND_CONSTANTS DYNAMIC_STATE_BLEND_CONSTANTS} specifies that the {@code blendConstants} state in {@link VkPipelineColorBlendStateCreateInfo} will be ignored and must be set dynamically with {@link #vkCmdSetBlendConstants CmdSetBlendConstants} before any draws are performed with a pipeline state with {@link VkPipelineColorBlendAttachmentState} member {@code blendEnable} set to {@link #VK_TRUE TRUE} and any of the blend functions using a constant blend color.
  • *
  • {@link #VK_DYNAMIC_STATE_DEPTH_BOUNDS DYNAMIC_STATE_DEPTH_BOUNDS} specifies that the {@code minDepthBounds} and {@code maxDepthBounds} states of {@link VkPipelineDepthStencilStateCreateInfo} will be ignored and must be set dynamically with {@link #vkCmdSetDepthBounds CmdSetDepthBounds} before any draws are performed with a pipeline state with {@link VkPipelineDepthStencilStateCreateInfo} member {@code depthBoundsTestEnable} set to {@link #VK_TRUE TRUE}.
  • *
  • {@link #VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK DYNAMIC_STATE_STENCIL_COMPARE_MASK} specifies that the {@code compareMask} state in {@link VkPipelineDepthStencilStateCreateInfo} for both {@code front} and {@code back} will be ignored and must be set dynamically with {@link #vkCmdSetStencilCompareMask CmdSetStencilCompareMask} before any draws are performed with a pipeline state with {@link VkPipelineDepthStencilStateCreateInfo} member {@code stencilTestEnable} set to {@link #VK_TRUE TRUE}
  • *
  • {@link #VK_DYNAMIC_STATE_STENCIL_WRITE_MASK DYNAMIC_STATE_STENCIL_WRITE_MASK} specifies that the {@code writeMask} state in {@link VkPipelineDepthStencilStateCreateInfo} for both {@code front} and {@code back} will be ignored and must be set dynamically with {@link #vkCmdSetStencilWriteMask CmdSetStencilWriteMask} before any draws are performed with a pipeline state with {@link VkPipelineDepthStencilStateCreateInfo} member {@code stencilTestEnable} set to {@link #VK_TRUE TRUE}
  • *
  • {@link #VK_DYNAMIC_STATE_STENCIL_REFERENCE DYNAMIC_STATE_STENCIL_REFERENCE} specifies that the {@code reference} state in {@link VkPipelineDepthStencilStateCreateInfo} for both {@code front} and {@code back} will be ignored and must be set dynamically with {@link #vkCmdSetStencilReference CmdSetStencilReference} before any draws are performed with a pipeline state with {@link VkPipelineDepthStencilStateCreateInfo} member {@code stencilTestEnable} set to {@link #VK_TRUE TRUE}
  • *
  • {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} specifies that the {@code pViewportScalings} state in {@link VkPipelineViewportWScalingStateCreateInfoNV} will be ignored and must be set dynamically with {@link NVClipSpaceWScaling#vkCmdSetViewportWScalingNV CmdSetViewportWScalingNV} before any draws are performed with a pipeline state with {@link VkPipelineViewportWScalingStateCreateInfoNV} member {@code viewportScalingEnable} set to {@link #VK_TRUE TRUE}
  • *
  • {@link EXTDiscardRectangles#VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT DYNAMIC_STATE_DISCARD_RECTANGLE_EXT} specifies that the {@code pDiscardRectangles} state in {@link VkPipelineDiscardRectangleStateCreateInfoEXT} will be ignored and must be set dynamically with {@link EXTDiscardRectangles#vkCmdSetDiscardRectangleEXT CmdSetDiscardRectangleEXT} before any draw or clear commands. The {@code VkDiscardRectangleModeEXT} and the number of active discard rectangles is still specified by the {@code discardRectangleMode} and {@code discardRectangleCount} members of {@link VkPipelineDiscardRectangleStateCreateInfoEXT}.
  • *
  • {@link EXTSampleLocations#VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT} specifies that the {@code sampleLocationsInfo} state in {@link VkPipelineSampleLocationsStateCreateInfoEXT} will be ignored and must be set dynamically with {@link EXTSampleLocations#vkCmdSetSampleLocationsEXT CmdSetSampleLocationsEXT} before any draw or clear commands. Enabling custom sample locations is still indicated by the {@code sampleLocationsEnable} member of {@link VkPipelineSampleLocationsStateCreateInfoEXT}.
  • *
  • {@link NVScissorExclusive#VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV} specifies that the {@code pExclusiveScissors} state in {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV} will be ignored and must be set dynamically with {@link NVScissorExclusive#vkCmdSetExclusiveScissorNV CmdSetExclusiveScissorNV} before any drawing commands. The number of exclusive scissor rectangles used by a pipeline is still specified by the {@code exclusiveScissorCount} member of {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV}.
  • *
  • {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} specifies that the {@code pShadingRatePalettes} state in {@link VkPipelineViewportShadingRateImageStateCreateInfoNV} will be ignored and must be set dynamically with {@link NVShadingRateImage#vkCmdSetViewportShadingRatePaletteNV CmdSetViewportShadingRatePaletteNV} before any drawing commands.
  • *
  • {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV} specifies that the coarse sample order state in {@link VkPipelineViewportCoarseSampleOrderStateCreateInfoNV} will be ignored and must be set dynamically with {@link NVShadingRateImage#vkCmdSetCoarseSampleOrderNV CmdSetCoarseSampleOrderNV} before any drawing commands.
  • *
  • {@link EXTLineRasterization#VK_DYNAMIC_STATE_LINE_STIPPLE_EXT DYNAMIC_STATE_LINE_STIPPLE_EXT} specifies that the {@code lineStippleFactor} and {@code lineStipplePattern} state in {@link VkPipelineRasterizationLineStateCreateInfoEXT} will be ignored and must be set dynamically with {@link EXTLineRasterization#vkCmdSetLineStippleEXT CmdSetLineStippleEXT} before any draws are performed with a pipeline state with {@link VkPipelineRasterizationLineStateCreateInfoEXT} member {@code stippledLineEnable} set to {@link #VK_TRUE TRUE}.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_CULL_MODE_EXT DYNAMIC_STATE_CULL_MODE_EXT} specifies that the {@code cullMode} state in {@link VkPipelineRasterizationStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetCullModeEXT CmdSetCullModeEXT} before any drawing commands.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_FRONT_FACE_EXT DYNAMIC_STATE_FRONT_FACE_EXT} specifies that the {@code frontFace} state in {@link VkPipelineRasterizationStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetFrontFaceEXT CmdSetFrontFaceEXT} before any drawing commands.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT} specifies that the {@code topology} state in {@link VkPipelineInputAssemblyStateCreateInfo} only specifies the topology class, and the specific topology order and adjacency must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetPrimitiveTopologyEXT CmdSetPrimitiveTopologyEXT} before any drawing commands.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} specifies that the {@code viewportCount} and {@code pViewports} state in {@link VkPipelineViewportStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} before any draw call.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} specifies that the {@code scissorCount} and {@code pScissors} state in {@link VkPipelineViewportStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} before any draw call.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} specifies that the {@code stride} state in {@link VkVertexInputBindingDescription} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} before any draw call.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT} specifies that the {@code depthTestEnable} state in {@link VkPipelineDepthStencilStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetDepthTestEnableEXT CmdSetDepthTestEnableEXT} before any draw call.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT} specifies that the {@code depthWriteEnable} state in {@link VkPipelineDepthStencilStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetDepthWriteEnableEXT CmdSetDepthWriteEnableEXT} before any draw call.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT} specifies that the {@code depthCompareOp} state in {@link VkPipelineDepthStencilStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetDepthCompareOpEXT CmdSetDepthCompareOpEXT} before any draw call.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT} specifies that the {@code depthBoundsTestEnable} state in {@link VkPipelineDepthStencilStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetDepthBoundsTestEnableEXT CmdSetDepthBoundsTestEnableEXT} before any draw call.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT} specifies that the {@code stencilTestEnable} state in {@link VkPipelineDepthStencilStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetStencilTestEnableEXT CmdSetStencilTestEnableEXT} before any draw call.
  • *
  • {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_STENCIL_OP_EXT DYNAMIC_STATE_STENCIL_OP_EXT} specifies that the {@code failOp}, {@code passOp}, {@code depthFailOp}, and {@code compareOp} states in {@link VkPipelineDepthStencilStateCreateInfo} for both {@code front} and {@code back} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState#vkCmdSetStencilOpEXT CmdSetStencilOpEXT} before any draws are performed with a pipeline state with {@link VkPipelineDepthStencilStateCreateInfo} member {@code stencilTestEnable} set to {@link #VK_TRUE TRUE}
  • *
  • {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT} specifies that the {@code patchControlPoints} state in {@link VkPipelineTessellationStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState2#vkCmdSetPatchControlPointsEXT CmdSetPatchControlPointsEXT} before any drawing commands.
  • *
  • {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT} specifies that the {@code rasterizerDiscardEnable} state in {@link VkPipelineRasterizationStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState2#vkCmdSetRasterizerDiscardEnableEXT CmdSetRasterizerDiscardEnableEXT} before any drawing commands.
  • *
  • {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT} specifies that the {@code depthBiasEnable} state in {@link VkPipelineRasterizationStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState2#vkCmdSetDepthBiasEnableEXT CmdSetDepthBiasEnableEXT} before any drawing commands.
  • *
  • {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_LOGIC_OP_EXT DYNAMIC_STATE_LOGIC_OP_EXT} specifies that the {@code logicOp} state in {@link VkPipelineColorBlendStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState2#vkCmdSetLogicOpEXT CmdSetLogicOpEXT} before any drawing commands.
  • *
  • {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT} specifies that the {@code primitiveRestartEnable} state in {@link VkPipelineInputAssemblyStateCreateInfo} will be ignored and must be set dynamically with {@link EXTExtendedDynamicState2#vkCmdSetPrimitiveRestartEnableEXT CmdSetPrimitiveRestartEnableEXT} before any drawing commands.
  • *
  • {@link KHRFragmentShadingRate#VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR} specifies that state in {@link VkPipelineFragmentShadingRateStateCreateInfoKHR} and {@link VkPipelineFragmentShadingRateEnumStateCreateInfoNV} will be ignored and must be set dynamically with {@link KHRFragmentShadingRate#vkCmdSetFragmentShadingRateKHR CmdSetFragmentShadingRateKHR} or {@link NVFragmentShadingRateEnums#vkCmdSetFragmentShadingRateEnumNV CmdSetFragmentShadingRateEnumNV} before any drawing commands.
  • *
  • {@link KHRRayTracingPipeline#VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR} specifies that the default stack size computation for the pipeline will be ignored and must be set dynamically with {@link KHRRayTracingPipeline#vkCmdSetRayTracingPipelineStackSizeKHR CmdSetRayTracingPipelineStackSizeKHR} before any ray tracing calls are performed.
  • *
  • {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} specifies that the {@code pVertexInputState} state will be ignored and must be set dynamically with {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} before any drawing commands
  • *
  • {@link EXTColorWriteEnable#VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT} specifies that the {@code pColorWriteEnables} state in {@link VkPipelineColorWriteCreateInfoEXT} will be ignored and must be set dynamically with {@link EXTColorWriteEnable#vkCmdSetColorWriteEnableEXT CmdSetColorWriteEnableEXT} before any draw call.
  • *
* *
See Also
* *

{@link VkPipelineDynamicStateCreateInfo}

*/ public static final int VK_DYNAMIC_STATE_VIEWPORT = 0, VK_DYNAMIC_STATE_SCISSOR = 1, VK_DYNAMIC_STATE_LINE_WIDTH = 2, VK_DYNAMIC_STATE_DEPTH_BIAS = 3, VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4, VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5, VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6, VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7, VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8; /** * VkFrontFace - Interpret polygon front-facing orientation * *
Description
* *
    *
  • {@link #VK_FRONT_FACE_COUNTER_CLOCKWISE FRONT_FACE_COUNTER_CLOCKWISE} specifies that a triangle with positive area is considered front-facing.
  • *
  • {@link #VK_FRONT_FACE_CLOCKWISE FRONT_FACE_CLOCKWISE} specifies that a triangle with negative area is considered front-facing.
  • *
* *

Any triangle which is not front-facing is back-facing, including zero-area triangles.

* *
See Also
* *

{@link VkPipelineRasterizationStateCreateInfo}, {@link EXTExtendedDynamicState#vkCmdSetFrontFaceEXT CmdSetFrontFaceEXT}

*/ public static final int VK_FRONT_FACE_COUNTER_CLOCKWISE = 0, VK_FRONT_FACE_CLOCKWISE = 1; /** * VkVertexInputRate - Specify rate at which vertex attributes are pulled from buffers * *
Description
* *
    *
  • {@link #VK_VERTEX_INPUT_RATE_VERTEX VERTEX_INPUT_RATE_VERTEX} specifies that vertex attribute addressing is a function of the vertex index.
  • *
  • {@link #VK_VERTEX_INPUT_RATE_INSTANCE VERTEX_INPUT_RATE_INSTANCE} specifies that vertex attribute addressing is a function of the instance index.
  • *
* *
See Also
* *

{@link VkVertexInputBindingDescription}, {@link VkVertexInputBindingDescription2EXT}

*/ public static final int VK_VERTEX_INPUT_RATE_VERTEX = 0, VK_VERTEX_INPUT_RATE_INSTANCE = 1; /** * VkPrimitiveTopology - Supported primitive topologies * *
Description
* *
    *
  • {@link #VK_PRIMITIVE_TOPOLOGY_POINT_LIST PRIMITIVE_TOPOLOGY_POINT_LIST} specifies a series of separate point primitives.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_LINE_LIST PRIMITIVE_TOPOLOGY_LINE_LIST} specifies a series of separate line primitives.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_LINE_STRIP PRIMITIVE_TOPOLOGY_LINE_STRIP} specifies a series of connected line primitives with consecutive lines sharing a vertex.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST PRIMITIVE_TOPOLOGY_TRIANGLE_LIST} specifies a series of separate triangle primitives.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP} specifies a series of connected triangle primitives with consecutive triangles sharing an edge.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN PRIMITIVE_TOPOLOGY_TRIANGLE_FAN} specifies a series of connected triangle primitives with all triangles sharing a common vertex. If the {@link KHRPortabilitySubset VK_KHR_portability_subset} extension is enabled, and {@link VkPhysicalDevicePortabilitySubsetFeaturesKHR}{@code ::triangleFans} is {@link #VK_FALSE FALSE}, then triangle fans are not supported by the implementation, and {@link #VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN PRIMITIVE_TOPOLOGY_TRIANGLE_FAN} must not be used.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY} specifies a series of separate line primitives with adjacency.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY} specifies a series of connected line primitives with adjacency, with consecutive primitives sharing three vertices.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY} specifies a series of separate triangle primitives with adjacency.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY} specifies connected triangle primitives with adjacency, with consecutive triangles sharing an edge.
  • *
  • {@link #VK_PRIMITIVE_TOPOLOGY_PATCH_LIST PRIMITIVE_TOPOLOGY_PATCH_LIST} specifies separate patch primitives.
  • *
* *

Each primitive topology, and its construction from a list of vertices, is described in detail below with a supporting diagram, according to the following key:

* * * * * * * * * * *
primitive topology key vertexVertexA point in 3-dimensional space. Positions chosen within the diagrams are arbitrary and for illustration only.
primitive topology key vertex numberVertex NumberSequence position of a vertex within the provided vertex data.
primitive topology key provoking vertexProvoking VertexProvoking vertex within the main primitive. The tail is angled towards the relevant primitive. Used in flat shading.
primitive topology key edgePrimitive EdgeAn edge connecting the points of a main primitive.
primitive topology key adjacency edgeAdjacency EdgePoints connected by these lines do not contribute to a main primitive, and are only accessible in a geometry shader.
primitive topology key winding orderWinding OrderThe relative order in which vertices are defined within a primitive, used in the facing determination. This ordering has no specific start or end point.
* *

The diagrams are supported with mathematical definitions where the vertices (v) and primitives (p) are numbered starting from 0; v0 is the first vertex in the provided data and p0 is the first primitive in the set of primitives defined by the vertices and topology.

* *
See Also
* *

{@link VkPipelineInputAssemblyStateCreateInfo}, {@link EXTExtendedDynamicState#vkCmdSetPrimitiveTopologyEXT CmdSetPrimitiveTopologyEXT}

*/ public static final int VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0, VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9, VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10; /** * VkPolygonMode - Control polygon rasterization mode * *
Description
* *
    *
  • {@link #VK_POLYGON_MODE_POINT POLYGON_MODE_POINT} specifies that polygon vertices are drawn as points.
  • *
  • {@link #VK_POLYGON_MODE_LINE POLYGON_MODE_LINE} specifies that polygon edges are drawn as line segments.
  • *
  • {@link #VK_POLYGON_MODE_FILL POLYGON_MODE_FILL} specifies that polygons are rendered using the polygon rasterization rules in this section.
  • *
  • {@link NVFillRectangle#VK_POLYGON_MODE_FILL_RECTANGLE_NV POLYGON_MODE_FILL_RECTANGLE_NV} specifies that polygons are rendered using polygon rasterization rules, modified to consider a sample within the primitive if the sample location is inside the axis-aligned bounding box of the triangle after projection. Note that the barycentric weights used in attribute interpolation can extend outside the range [0,1] when these primitives are shaded. Special treatment is given to a sample position on the boundary edge of the bounding box. In such a case, if two rectangles lie on either side of a common edge (with identical endpoints) on which a sample position lies, then exactly one of the triangles must produce a fragment that covers that sample during rasterization. * Polygons rendered in {@link NVFillRectangle#VK_POLYGON_MODE_FILL_RECTANGLE_NV POLYGON_MODE_FILL_RECTANGLE_NV} mode may be clipped by the frustum or by user clip planes. If clipping is applied, the triangle is culled rather than clipped. * *

    Area calculation and facingness are determined for {@link NVFillRectangle#VK_POLYGON_MODE_FILL_RECTANGLE_NV POLYGON_MODE_FILL_RECTANGLE_NV} mode using the triangle’s vertices.

    *
  • *
* *

These modes affect only the final rasterization of polygons: in particular, a polygon’s vertices are shaded and the polygon is clipped and possibly culled before these modes are applied.

* *
See Also
* *

{@link VkPipelineRasterizationStateCreateInfo}

*/ public static final int VK_POLYGON_MODE_FILL = 0, VK_POLYGON_MODE_LINE = 1, VK_POLYGON_MODE_POINT = 2; /** * VkStencilOp - Stencil comparison function * *
Description
* *
    *
  • {@link #VK_STENCIL_OP_KEEP STENCIL_OP_KEEP} keeps the current value.
  • *
  • {@link #VK_STENCIL_OP_ZERO STENCIL_OP_ZERO} sets the value to 0.
  • *
  • {@link #VK_STENCIL_OP_REPLACE STENCIL_OP_REPLACE} sets the value to {@code reference}.
  • *
  • {@link #VK_STENCIL_OP_INCREMENT_AND_CLAMP STENCIL_OP_INCREMENT_AND_CLAMP} increments the current value and clamps to the maximum representable unsigned value.
  • *
  • {@link #VK_STENCIL_OP_DECREMENT_AND_CLAMP STENCIL_OP_DECREMENT_AND_CLAMP} decrements the current value and clamps to 0.
  • *
  • {@link #VK_STENCIL_OP_INVERT STENCIL_OP_INVERT} bitwise-inverts the current value.
  • *
  • {@link #VK_STENCIL_OP_INCREMENT_AND_WRAP STENCIL_OP_INCREMENT_AND_WRAP} increments the current value and wraps to 0 when the maximum value would have been exceeded.
  • *
  • {@link #VK_STENCIL_OP_DECREMENT_AND_WRAP STENCIL_OP_DECREMENT_AND_WRAP} decrements the current value and wraps to the maximum possible value when the value would go below 0.
  • *
* *

For purposes of increment and decrement, the stencil bits are considered as an unsigned integer.

* *
See Also
* *

{@link VkStencilOpState}, {@link EXTExtendedDynamicState#vkCmdSetStencilOpEXT CmdSetStencilOpEXT}

*/ public static final int VK_STENCIL_OP_KEEP = 0, VK_STENCIL_OP_ZERO = 1, VK_STENCIL_OP_REPLACE = 2, VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3, VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4, VK_STENCIL_OP_INVERT = 5, VK_STENCIL_OP_INCREMENT_AND_WRAP = 6, VK_STENCIL_OP_DECREMENT_AND_WRAP = 7; /** * VkLogicOp - Framebuffer logical operations * *
Description
* *

The logical operations supported by Vulkan are summarized in the following table in which

* *
    *
  • ¬ is bitwise invert,
  • *
  • is bitwise and,
  • *
  • is bitwise or,
  • *
  • is bitwise exclusive or,
  • *
  • s is the fragment’s Rs0, Gs0, Bs0 or As0 component value for the fragment output corresponding to the color attachment being updated, and
  • *
  • d is the color attachment’s R, G, B or A component value:
  • *
* *
Logical Operations
* * * * * * * * * * * * * * * * * * * * * *
ModeOperation
{@link #VK_LOGIC_OP_CLEAR LOGIC_OP_CLEAR}0
{@link #VK_LOGIC_OP_AND LOGIC_OP_AND}s ∧ d
{@link #VK_LOGIC_OP_AND_REVERSE LOGIC_OP_AND_REVERSE}s ∧ ¬ d
{@link #VK_LOGIC_OP_COPY LOGIC_OP_COPY}s
{@link #VK_LOGIC_OP_AND_INVERTED LOGIC_OP_AND_INVERTED}¬ s ∧ d
{@link #VK_LOGIC_OP_NO_OP LOGIC_OP_NO_OP}d
{@link #VK_LOGIC_OP_XOR LOGIC_OP_XOR}s ⊕ d
{@link #VK_LOGIC_OP_OR LOGIC_OP_OR}s ∨ d
{@link #VK_LOGIC_OP_NOR LOGIC_OP_NOR}¬ (s ∨ d)
{@link #VK_LOGIC_OP_EQUIVALENT LOGIC_OP_EQUIVALENT}¬ (s ⊕ d)
{@link #VK_LOGIC_OP_INVERT LOGIC_OP_INVERT}¬ d
{@link #VK_LOGIC_OP_OR_REVERSE LOGIC_OP_OR_REVERSE}s ∨ ¬ d
{@link #VK_LOGIC_OP_COPY_INVERTED LOGIC_OP_COPY_INVERTED}¬ s
{@link #VK_LOGIC_OP_OR_INVERTED LOGIC_OP_OR_INVERTED}¬ s ∨ d
{@link #VK_LOGIC_OP_NAND LOGIC_OP_NAND}¬ (s ∧ d)
{@link #VK_LOGIC_OP_SET LOGIC_OP_SET}all 1s
* *

The result of the logical operation is then written to the color attachment as controlled by the component write mask, described in Blend Operations.

* *
See Also
* *

{@link VkPipelineColorBlendStateCreateInfo}, {@link EXTExtendedDynamicState2#vkCmdSetLogicOpEXT CmdSetLogicOpEXT}

*/ public static final int VK_LOGIC_OP_CLEAR = 0, VK_LOGIC_OP_AND = 1, VK_LOGIC_OP_AND_REVERSE = 2, VK_LOGIC_OP_COPY = 3, VK_LOGIC_OP_AND_INVERTED = 4, VK_LOGIC_OP_NO_OP = 5, VK_LOGIC_OP_XOR = 6, VK_LOGIC_OP_OR = 7, VK_LOGIC_OP_NOR = 8, VK_LOGIC_OP_EQUIVALENT = 9, VK_LOGIC_OP_INVERT = 10, VK_LOGIC_OP_OR_REVERSE = 11, VK_LOGIC_OP_COPY_INVERTED = 12, VK_LOGIC_OP_OR_INVERTED = 13, VK_LOGIC_OP_NAND = 14, VK_LOGIC_OP_SET = 15; /** * VkBorderColor - Specify border color used for texture lookups * *
Description
* *
    *
  • {@link #VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK BORDER_COLOR_FLOAT_TRANSPARENT_BLACK} specifies a transparent, floating-point format, black color.
  • *
  • {@link #VK_BORDER_COLOR_INT_TRANSPARENT_BLACK BORDER_COLOR_INT_TRANSPARENT_BLACK} specifies a transparent, integer format, black color.
  • *
  • {@link #VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK BORDER_COLOR_FLOAT_OPAQUE_BLACK} specifies an opaque, floating-point format, black color.
  • *
  • {@link #VK_BORDER_COLOR_INT_OPAQUE_BLACK BORDER_COLOR_INT_OPAQUE_BLACK} specifies an opaque, integer format, black color.
  • *
  • {@link #VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE BORDER_COLOR_FLOAT_OPAQUE_WHITE} specifies an opaque, floating-point format, white color.
  • *
  • {@link #VK_BORDER_COLOR_INT_OPAQUE_WHITE BORDER_COLOR_INT_OPAQUE_WHITE} specifies an opaque, integer format, white color.
  • *
  • {@link EXTCustomBorderColor#VK_BORDER_COLOR_FLOAT_CUSTOM_EXT BORDER_COLOR_FLOAT_CUSTOM_EXT} indicates that a {@link VkSamplerCustomBorderColorCreateInfoEXT} structure is included in the {@link VkSamplerCreateInfo}{@code ::pNext} chain which contains the color data in floating-point format.
  • *
  • {@link EXTCustomBorderColor#VK_BORDER_COLOR_INT_CUSTOM_EXT BORDER_COLOR_INT_CUSTOM_EXT} indicates that a {@link VkSamplerCustomBorderColorCreateInfoEXT} structure is included in the {@link VkSamplerCreateInfo}{@code ::pNext} chain which contains the color data in integer format.
  • *
* *

These colors are described in detail in Texel Replacement.

* *
See Also
* *

{@link VkSamplerCreateInfo}

*/ public static final int VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0, VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2, VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3, VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4, VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5; /** * VkFilter - Specify filters used for texture lookups * *
Description
* *
    *
  • {@link #VK_FILTER_NEAREST FILTER_NEAREST} specifies nearest filtering.
  • *
  • {@link #VK_FILTER_LINEAR FILTER_LINEAR} specifies linear filtering.
  • *
  • {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} specifies cubic filtering.
  • *
* *

These filters are described in detail in Texel Filtering.

* *
See Also
* *

{@link VkBlitImageInfo2KHR}, {@link VkSamplerCreateInfo}, {@link VkSamplerYcbcrConversionCreateInfo}, {@link #vkCmdBlitImage CmdBlitImage}

*/ public static final int VK_FILTER_NEAREST = 0, VK_FILTER_LINEAR = 1; /** * VkSamplerAddressMode - Specify behavior of sampling with texture coordinates outside an image * *
Description
* *
    *
  • {@link #VK_SAMPLER_ADDRESS_MODE_REPEAT SAMPLER_ADDRESS_MODE_REPEAT} specifies that the repeat wrap mode will be used.
  • *
  • {@link #VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT} specifies that the mirrored repeat wrap mode will be used.
  • *
  • {@link #VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE} specifies that the clamp to edge wrap mode will be used.
  • *
  • {@link #VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER} specifies that the clamp to border wrap mode will be used.
  • *
  • {@link VK12#VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE} specifies that the mirror clamp to edge wrap mode will be used. This is only valid if samplerMirrorClampToEdge is enabled, or if the {@link KHRSamplerMirrorClampToEdge VK_KHR_sampler_mirror_clamp_to_edge} extension is enabled.
  • *
* *
See Also
* *

{@link VkSamplerCreateInfo}

*/ public static final int VK_SAMPLER_ADDRESS_MODE_REPEAT = 0, VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3; /** * VkSamplerMipmapMode - Specify mipmap mode used for texture lookups * *
Description
* *
    *
  • {@link #VK_SAMPLER_MIPMAP_MODE_NEAREST SAMPLER_MIPMAP_MODE_NEAREST} specifies nearest filtering.
  • *
  • {@link #VK_SAMPLER_MIPMAP_MODE_LINEAR SAMPLER_MIPMAP_MODE_LINEAR} specifies linear filtering.
  • *
* *

These modes are described in detail in Texel Filtering.

* *
See Also
* *

{@link VkSamplerCreateInfo}

*/ public static final int VK_SAMPLER_MIPMAP_MODE_NEAREST = 0, VK_SAMPLER_MIPMAP_MODE_LINEAR = 1; /** * VkDescriptorPoolCreateFlagBits - Bitmask specifying certain supported operations on a descriptor pool * *
Description
* *
    *
  • {@link #VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT} specifies that descriptor sets can return their individual allocations to the pool, i.e. all of {@link #vkAllocateDescriptorSets AllocateDescriptorSets}, {@link #vkFreeDescriptorSets FreeDescriptorSets}, and {@link #vkResetDescriptorPool ResetDescriptorPool} are allowed. Otherwise, descriptor sets allocated from the pool must not be individually freed back to the pool, i.e. only {@link #vkAllocateDescriptorSets AllocateDescriptorSets} and {@link #vkResetDescriptorPool ResetDescriptorPool} are allowed.
  • *
  • {@link VK12#VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT} specifies that descriptor sets allocated from this pool can include bindings with the {@link VK12#VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT} bit set. It is valid to allocate descriptor sets that have bindings that do not set the {@link VK12#VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT} bit from a pool that has {@link VK12#VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT} set.
  • *
  • {@link VALVEMutableDescriptorType#VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE} specifies that this descriptor pool and the descriptor sets allocated from it reside entirely in host memory and cannot be bound. Descriptor sets allocated from this pool are partially exempt from the external synchronization requirement in {@link KHRDescriptorUpdateTemplate#vkUpdateDescriptorSetWithTemplateKHR UpdateDescriptorSetWithTemplateKHR} and {@link #vkUpdateDescriptorSets UpdateDescriptorSets}. Descriptor sets and their descriptors can be updated concurrently in different threads, though the same descriptor must not be updated concurrently by two threads.
  • *
*/ public static final int VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x1; /** * VkDescriptorType - Specifies the type of a descriptor in a descriptor set * *
Description
* * * *

When a descriptor set is updated via elements of {@link VkWriteDescriptorSet}, members of {@code pImageInfo}, {@code pBufferInfo} and {@code pTexelBufferView} are only accessed by the implementation when they correspond to descriptor type being defined - otherwise they are ignored. The members accessed are as follows for each descriptor type:

* *
    *
  • For {@link #VK_DESCRIPTOR_TYPE_SAMPLER DESCRIPTOR_TYPE_SAMPLER}, only the {@code sampler} member of each element of {@link VkWriteDescriptorSet}{@code ::pImageInfo} is accessed.
  • *
  • For {@link #VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE DESCRIPTOR_TYPE_SAMPLED_IMAGE}, {@link #VK_DESCRIPTOR_TYPE_STORAGE_IMAGE DESCRIPTOR_TYPE_STORAGE_IMAGE}, or {@link #VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT DESCRIPTOR_TYPE_INPUT_ATTACHMENT}, only the {@code imageView} and {@code imageLayout} members of each element of {@link VkWriteDescriptorSet}{@code ::pImageInfo} are accessed.
  • *
  • For {@link #VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER}, all members of each element of {@link VkWriteDescriptorSet}{@code ::pImageInfo} are accessed.
  • *
  • For {@link #VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER DESCRIPTOR_TYPE_UNIFORM_BUFFER}, {@link #VK_DESCRIPTOR_TYPE_STORAGE_BUFFER DESCRIPTOR_TYPE_STORAGE_BUFFER}, {@link #VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC}, or {@link #VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC}, all members of each element of {@link VkWriteDescriptorSet}{@code ::pBufferInfo} are accessed.
  • *
  • For {@link #VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER} or {@link #VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER}, each element of {@link VkWriteDescriptorSet}{@code ::pTexelBufferView} is accessed.
  • *
* *

When updating descriptors with a {@code descriptorType} of {@link EXTInlineUniformBlock#VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT}, none of the {@code pImageInfo}, {@code pBufferInfo}, or {@code pTexelBufferView} members are accessed, instead the source data of the descriptor update operation is taken from the {@link VkWriteDescriptorSetInlineUniformBlockEXT} structure in the {@code pNext} chain of {@link VkWriteDescriptorSet}. When updating descriptors with a {@code descriptorType} of {@link KHRAccelerationStructure#VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR}, none of the {@code pImageInfo}, {@code pBufferInfo}, or {@code pTexelBufferView} members are accessed, instead the source data of the descriptor update operation is taken from the {@link VkWriteDescriptorSetAccelerationStructureKHR} structure in the {@code pNext} chain of {@link VkWriteDescriptorSet}. When updating descriptors with a {@code descriptorType} of {@link NVRayTracing#VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV}, none of the {@code pImageInfo}, {@code pBufferInfo}, or {@code pTexelBufferView} members are accessed, instead the source data of the descriptor update operation is taken from the {@link VkWriteDescriptorSetAccelerationStructureNV} structure in the {@code pNext} chain of {@link VkWriteDescriptorSet}.

* *
See Also
* *

{@link VkDescriptorPoolSize}, {@link VkDescriptorSetLayoutBinding}, {@link VkDescriptorUpdateTemplateEntry}, {@link VkImageViewHandleInfoNVX}, {@link VkMutableDescriptorTypeListVALVE}, {@link VkWriteDescriptorSet}

*/ public static final int VK_DESCRIPTOR_TYPE_SAMPLER = 0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10; /** * VkAttachmentDescriptionFlagBits - Bitmask specifying additional properties of an attachment * *
Description
* *
    *
  • {@link #VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT} specifies that the attachment aliases the same device memory as other attachments.
  • *
*/ public static final int VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x1; /** * VkAttachmentLoadOp - Specify how contents of an attachment are treated at the beginning of a subpass * *
Description
* *
    *
  • {@link #VK_ATTACHMENT_LOAD_OP_LOAD ATTACHMENT_LOAD_OP_LOAD} specifies that the previous contents of the image within the render area will be preserved. For attachments with a depth/stencil format, this uses the access type {@link #VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT}. For attachments with a color format, this uses the access type {@link #VK_ACCESS_COLOR_ATTACHMENT_READ_BIT ACCESS_COLOR_ATTACHMENT_READ_BIT}.
  • *
  • {@link #VK_ATTACHMENT_LOAD_OP_CLEAR ATTACHMENT_LOAD_OP_CLEAR} specifies that the contents within the render area will be cleared to a uniform value, which is specified when a render pass instance is begun. For attachments with a depth/stencil format, this uses the access type {@link #VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT}. For attachments with a color format, this uses the access type {@link #VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT ACCESS_COLOR_ATTACHMENT_WRITE_BIT}.
  • *
  • {@link #VK_ATTACHMENT_LOAD_OP_DONT_CARE ATTACHMENT_LOAD_OP_DONT_CARE} specifies that the previous contents within the area need not be preserved; the contents of the attachment will be undefined inside the render area. For attachments with a depth/stencil format, this uses the access type {@link #VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT}. For attachments with a color format, this uses the access type {@link #VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT ACCESS_COLOR_ATTACHMENT_WRITE_BIT}.
  • *
  • {@link EXTLoadStoreOpNone#VK_ATTACHMENT_LOAD_OP_NONE_EXT ATTACHMENT_LOAD_OP_NONE_EXT} specifies that the previous contents of the image within the render area will be preserved, but the contents of the attachment will be undefined inside the render pass. No access type is used as the image is not accessed.
  • *
* *
See Also
* *

{@link VkAttachmentDescription}, {@link VkAttachmentDescription2}, {@link VkRenderingAttachmentInfoKHR}

*/ public static final int VK_ATTACHMENT_LOAD_OP_LOAD = 0, VK_ATTACHMENT_LOAD_OP_CLEAR = 1, VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2; /** * VkAttachmentStoreOp - Specify how contents of an attachment are treated at the end of a subpass * *
Description
* *
    *
  • {@link #VK_ATTACHMENT_STORE_OP_STORE ATTACHMENT_STORE_OP_STORE} specifies the contents generated during the render pass and within the render area are written to memory. For attachments with a depth/stencil format, this uses the access type {@link #VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT}. For attachments with a color format, this uses the access type {@link #VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT ACCESS_COLOR_ATTACHMENT_WRITE_BIT}.
  • *
  • {@link #VK_ATTACHMENT_STORE_OP_DONT_CARE ATTACHMENT_STORE_OP_DONT_CARE} specifies the contents within the render area are not needed after rendering, and may be discarded; the contents of the attachment will be undefined inside the render area. For attachments with a depth/stencil format, this uses the access type {@link #VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT}. For attachments with a color format, this uses the access type {@link #VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT ACCESS_COLOR_ATTACHMENT_WRITE_BIT}.
  • *
  • {@link KHRDynamicRendering#VK_ATTACHMENT_STORE_OP_NONE_KHR ATTACHMENT_STORE_OP_NONE_KHR} specifies the contents within the render area are not accessed by the store operation. However, if the attachment was written to during the render pass, the contents of the attachment will be undefined inside the render area.
  • *
* *
Note
* *

{@link #VK_ATTACHMENT_STORE_OP_DONT_CARE ATTACHMENT_STORE_OP_DONT_CARE} can cause contents generated during previous render passes to be discarded before reaching memory, even if no write to the attachment occurs during the current render pass.

*
* *
See Also
* *

{@link VkAttachmentDescription}, {@link VkAttachmentDescription2}, {@link VkRenderingAttachmentInfoKHR}

*/ public static final int VK_ATTACHMENT_STORE_OP_STORE = 0, VK_ATTACHMENT_STORE_OP_DONT_CARE = 1; /** * VkDependencyFlagBits - Bitmask specifying how execution and memory dependencies are formed * *
Description
* *
    *
  • {@link #VK_DEPENDENCY_BY_REGION_BIT DEPENDENCY_BY_REGION_BIT} specifies that dependencies will be framebuffer-local.
  • *
  • {@link VK11#VK_DEPENDENCY_VIEW_LOCAL_BIT DEPENDENCY_VIEW_LOCAL_BIT} specifies that a subpass has more than one view.
  • *
  • {@link VK11#VK_DEPENDENCY_DEVICE_GROUP_BIT DEPENDENCY_DEVICE_GROUP_BIT} specifies that dependencies are non-device-local.
  • *
*/ public static final int VK_DEPENDENCY_BY_REGION_BIT = 0x1; /** * VkPipelineBindPoint - Specify the bind point of a pipeline object to a command buffer * *
Description
* *
    *
  • {@link #VK_PIPELINE_BIND_POINT_COMPUTE PIPELINE_BIND_POINT_COMPUTE} specifies binding as a compute pipeline.
  • *
  • {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS} specifies binding as a graphics pipeline.
  • *
  • {@link KHRRayTracingPipeline#VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR PIPELINE_BIND_POINT_RAY_TRACING_KHR} specifies binding as a ray tracing pipeline.
  • *
  • {@link HUAWEISubpassShading#VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI} specifies binding as a subpass shading pipeline.
  • *
* *
See Also
* *

{@link VkDescriptorUpdateTemplateCreateInfo}, {@link VkGeneratedCommandsInfoNV}, {@link VkGeneratedCommandsMemoryRequirementsInfoNV}, {@link VkIndirectCommandsLayoutCreateInfoNV}, {@link VkSubpassDescription}, {@link VkSubpassDescription2}, {@link #vkCmdBindDescriptorSets CmdBindDescriptorSets}, {@link #vkCmdBindPipeline CmdBindPipeline}, {@link NVDeviceGeneratedCommands#vkCmdBindPipelineShaderGroupNV CmdBindPipelineShaderGroupNV}, {@link KHRPushDescriptor#vkCmdPushDescriptorSetKHR CmdPushDescriptorSetKHR}

*/ public static final int VK_PIPELINE_BIND_POINT_GRAPHICS = 0, VK_PIPELINE_BIND_POINT_COMPUTE = 1; /** * VkCommandPoolCreateFlagBits - Bitmask specifying usage behavior for a command pool * *
Description
* *
    *
  • {@link #VK_COMMAND_POOL_CREATE_TRANSIENT_BIT COMMAND_POOL_CREATE_TRANSIENT_BIT} specifies that command buffers allocated from the pool will be short-lived, meaning that they will be reset or freed in a relatively short timeframe. This flag may be used by the implementation to control memory allocation behavior within the pool.
  • *
  • {@link #VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT} allows any command buffer allocated from a pool to be individually reset to the initial state; either by calling {@link #vkResetCommandBuffer ResetCommandBuffer}, or via the implicit reset when calling {@link #vkBeginCommandBuffer BeginCommandBuffer}. If this flag is not set on a pool, then {@code vkResetCommandBuffer} must not be called for any command buffer allocated from that pool.
  • *
  • {@link VK11#VK_COMMAND_POOL_CREATE_PROTECTED_BIT COMMAND_POOL_CREATE_PROTECTED_BIT} specifies that command buffers allocated from the pool are protected command buffers.
  • *
*/ public static final int VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x1, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x2; /** * VkCommandPoolResetFlagBits - Bitmask controlling behavior of a command pool reset * *
Description
* *
    *
  • {@link #VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT} specifies that resetting a command pool recycles all of the resources from the command pool back to the system.
  • *
*/ public static final int VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x1; /** * VkCommandBufferLevel - Enumerant specifying a command buffer level * *
Description
* *
    *
  • {@link #VK_COMMAND_BUFFER_LEVEL_PRIMARY COMMAND_BUFFER_LEVEL_PRIMARY} specifies a primary command buffer.
  • *
  • {@link #VK_COMMAND_BUFFER_LEVEL_SECONDARY COMMAND_BUFFER_LEVEL_SECONDARY} specifies a secondary command buffer.
  • *
* *
See Also
* *

{@link VkCommandBufferAllocateInfo}

*/ public static final int VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0, VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1; /** * VkCommandBufferUsageFlagBits - Bitmask specifying usage behavior for command buffer * *
Description
* *
    *
  • {@link #VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT} specifies that each recording of the command buffer will only be submitted once, and the command buffer will be reset and recorded again between each submission.
  • *
  • {@link #VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT} specifies that a secondary command buffer is considered to be entirely inside a render pass. If this is a primary command buffer, then this bit is ignored.
  • *
  • {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} specifies that a command buffer can be resubmitted to a queue while it is in the pending state, and recorded into multiple primary command buffers.
  • *
*/ public static final int VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x1, VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x2, VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x4; /** * VkQueryControlFlagBits - Bitmask specifying constraints on a query * *
Description
* *
    *
  • {@link #VK_QUERY_CONTROL_PRECISE_BIT QUERY_CONTROL_PRECISE_BIT} specifies the precision of occlusion queries.
  • *
*/ public static final int VK_QUERY_CONTROL_PRECISE_BIT = 0x1; /** * VkCommandBufferResetFlagBits - Bitmask controlling behavior of a command buffer reset * *
Description
* *
    *
  • {@link #VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT} specifies that most or all memory resources currently owned by the command buffer should be returned to the parent command pool. If this flag is not set, then the command buffer may hold onto memory resources and reuse them when recording commands. {@code commandBuffer} is moved to the initial state.
  • *
*/ public static final int VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x1; /** * VkIndexType - Type of index buffer indices * *
Description
* *
    *
  • {@link #VK_INDEX_TYPE_UINT16 INDEX_TYPE_UINT16} specifies that indices are 16-bit unsigned integer values.
  • *
  • {@link #VK_INDEX_TYPE_UINT32 INDEX_TYPE_UINT32} specifies that indices are 32-bit unsigned integer values.
  • *
  • {@link KHRAccelerationStructure#VK_INDEX_TYPE_NONE_KHR INDEX_TYPE_NONE_KHR} specifies that no indices are provided.
  • *
  • {@link EXTIndexTypeUint8#VK_INDEX_TYPE_UINT8_EXT INDEX_TYPE_UINT8_EXT} specifies that indices are 8-bit unsigned integer values.
  • *
* *
See Also
* *

{@link VkAccelerationStructureGeometryTrianglesDataKHR}, {@link VkBindIndexBufferIndirectCommandNV}, {@link VkGeometryTrianglesNV}, {@link VkIndirectCommandsLayoutTokenNV}, {@link #vkCmdBindIndexBuffer CmdBindIndexBuffer}

*/ public static final int VK_INDEX_TYPE_UINT16 = 0, VK_INDEX_TYPE_UINT32 = 1; /** * VkStencilFaceFlagBits - Bitmask specifying sets of stencil state for which to update the compare mask * *
Description
* *
    *
  • {@link #VK_STENCIL_FACE_FRONT_BIT STENCIL_FACE_FRONT_BIT} specifies that only the front set of stencil state is updated.
  • *
  • {@link #VK_STENCIL_FACE_BACK_BIT STENCIL_FACE_BACK_BIT} specifies that only the back set of stencil state is updated.
  • *
  • {@link #VK_STENCIL_FACE_FRONT_AND_BACK STENCIL_FACE_FRONT_AND_BACK} is the combination of {@link #VK_STENCIL_FACE_FRONT_BIT STENCIL_FACE_FRONT_BIT} and {@link #VK_STENCIL_FACE_BACK_BIT STENCIL_FACE_BACK_BIT}, and specifies that both sets of stencil state are updated.
  • *
* *
Enum values:
* *
    *
  • {@link #VK_STENCIL_FRONT_AND_BACK STENCIL_FRONT_AND_BACK}
  • *
*/ public static final int VK_STENCIL_FACE_FRONT_BIT = 0x1, VK_STENCIL_FACE_BACK_BIT = 0x2, VK_STENCIL_FACE_FRONT_AND_BACK = 0x00000003, VK_STENCIL_FRONT_AND_BACK = 0x00000003; /** * VkSubpassContents - Specify how commands in the first subpass of a render pass are provided * *
Description
* *
    *
  • {@link #VK_SUBPASS_CONTENTS_INLINE SUBPASS_CONTENTS_INLINE} specifies that the contents of the subpass will be recorded inline in the primary command buffer, and secondary command buffers must not be executed within the subpass.
  • *
  • {@link #VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS} specifies that the contents are recorded in secondary command buffers that will be called from the primary command buffer, and {@link #vkCmdExecuteCommands CmdExecuteCommands} is the only valid command on the command buffer until {@link #vkCmdNextSubpass CmdNextSubpass} or {@link #vkCmdEndRenderPass CmdEndRenderPass}.
  • *
* *
See Also
* *

{@link VkSubpassBeginInfo}, {@link #vkCmdBeginRenderPass CmdBeginRenderPass}, {@link #vkCmdNextSubpass CmdNextSubpass}

*/ public static final int VK_SUBPASS_CONTENTS_INLINE = 0, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1; /** * The API version number for Vulkan 1.0. * *

The patch version number in this macro will always be zero. The supported patch version for a physical device can be queried with * {@link #vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties}.

*/ public static final int VK_API_VERSION_1_0 = VK_MAKE_VERSION(1, 0, 0); /** The Vulkan registry version used to generate the LWJGL bindings. */ public static final int VK_HEADER_VERSION = 198; /** * The reserved handle {@code VK_NULL_HANDLE} can be passed in place of valid object handles when explicitly called out in the specification. Any * command that creates an object successfully must not return {@code VK_NULL_HANDLE}. It is valid to pass {@code VK_NULL_HANDLE} to any * {@code vkDestroy*} or {@code vkFree*} command, which will silently ignore these values. */ public static final long VK_NULL_HANDLE = 0x0L; /** API Constants */ public static final int VK_MAX_PHYSICAL_DEVICE_NAME_SIZE = 256, VK_UUID_SIZE = 16, VK_LUID_SIZE = 8, VK_MAX_EXTENSION_NAME_SIZE = 256, VK_MAX_DESCRIPTION_SIZE = 256, VK_MAX_MEMORY_TYPES = 32, VK_MAX_MEMORY_HEAPS = 16, VK_REMAINING_MIP_LEVELS = (~0), VK_REMAINING_ARRAY_LAYERS = (~0), VK_ATTACHMENT_UNUSED = (~0), VK_TRUE = 1, VK_FALSE = 0, VK_QUEUE_FAMILY_IGNORED = (~0), VK_QUEUE_FAMILY_EXTERNAL = (~0-1), VK_SUBPASS_EXTERNAL = (~0), VK_MAX_DEVICE_GROUP_SIZE = 32, VK_MAX_DRIVER_NAME_SIZE = 256, VK_MAX_DRIVER_INFO_SIZE = 256; /** API Constants */ public static final float VK_LOD_CLAMP_NONE = 1000.0f; /** API Constants */ public static final long VK_WHOLE_SIZE = (~0L); protected VK10() { throw new UnsupportedOperationException(); } // --- [ vkCreateInstance ] --- /** Unsafe version of: {@link #vkCreateInstance CreateInstance} */ public static int nvkCreateInstance(long pCreateInfo, long pAllocator, long pInstance) { long __functionAddress = VK.getGlobalCommands().vkCreateInstance; if (CHECKS) { VkInstanceCreateInfo.validate(pCreateInfo); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPI(pCreateInfo, pAllocator, pInstance, __functionAddress); } /** * Create a new Vulkan instance. * *
C Specification
* *

To create an instance object, call:

* *

     * VkResult vkCreateInstance(
     *     const VkInstanceCreateInfo*                 pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkInstance*                                 pInstance);
* *
Description
* *

{@code vkCreateInstance} verifies that the requested layers exist. If not, {@code vkCreateInstance} will return {@link #VK_ERROR_LAYER_NOT_PRESENT ERROR_LAYER_NOT_PRESENT}. Next {@code vkCreateInstance} verifies that the requested extensions are supported (e.g. in the implementation or in any enabled instance layer) and if any requested extension is not supported, {@code vkCreateInstance} must return {@link #VK_ERROR_EXTENSION_NOT_PRESENT ERROR_EXTENSION_NOT_PRESENT}. After verifying and enabling the instance layers and extensions the {@code VkInstance} object is created and returned to the application. If a requested extension is only supported by a layer, both the layer and the extension need to be specified at {@code vkCreateInstance} time for the creation to succeed.

* *
Valid Usage
* *
    *
  • All required extensions for each extension in the {@link VkInstanceCreateInfo}{@code ::ppEnabledExtensionNames} list must also be present in that list
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkInstanceCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pInstance} must be a valid pointer to a {@code VkInstance} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}
  • *
  • {@link #VK_ERROR_LAYER_NOT_PRESENT ERROR_LAYER_NOT_PRESENT}
  • *
  • {@link #VK_ERROR_EXTENSION_NOT_PRESENT ERROR_EXTENSION_NOT_PRESENT}
  • *
  • {@link #VK_ERROR_INCOMPATIBLE_DRIVER ERROR_INCOMPATIBLE_DRIVER}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkInstanceCreateInfo}

* * @param pCreateInfo a pointer to a {@link VkInstanceCreateInfo} structure controlling creation of the instance. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pInstance points a {@code VkInstance} handle in which the resulting instance is returned. */ @NativeType("VkResult") public static int vkCreateInstance(@NativeType("VkInstanceCreateInfo const *") VkInstanceCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkInstance *") PointerBuffer pInstance) { if (CHECKS) { check(pInstance, 1); } return nvkCreateInstance(pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pInstance)); } // --- [ vkDestroyInstance ] --- /** Unsafe version of: {@link #vkDestroyInstance DestroyInstance} */ public static void nvkDestroyInstance(VkInstance instance, long pAllocator) { long __functionAddress = instance.getCapabilities().vkDestroyInstance; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPPV(instance.address(), pAllocator, __functionAddress); } /** * Destroy an instance of Vulkan. * *
C Specification
* *

To destroy an instance, call:

* *

     * void vkDestroyInstance(
     *     VkInstance                                  instance,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All child objects created using {@code instance} must have been destroyed prior to destroying {@code instance}
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code instance} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code instance} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • If {@code instance} is not {@code NULL}, {@code instance} must be a valid {@code VkInstance} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code instance} must be externally synchronized
  • *
  • Host access to all {@code VkPhysicalDevice} objects enumerated from {@code instance} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param instance the handle of the instance to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyInstance(VkInstance instance, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyInstance(instance, memAddressSafe(pAllocator)); } // --- [ vkEnumeratePhysicalDevices ] --- /** * Unsafe version of: {@link #vkEnumeratePhysicalDevices EnumeratePhysicalDevices} * * @param pPhysicalDeviceCount a pointer to an integer related to the number of physical devices available or queried, as described below. */ public static int nvkEnumeratePhysicalDevices(VkInstance instance, long pPhysicalDeviceCount, long pPhysicalDevices) { long __functionAddress = instance.getCapabilities().vkEnumeratePhysicalDevices; return callPPPI(instance.address(), pPhysicalDeviceCount, pPhysicalDevices, __functionAddress); } /** * Enumerates the physical devices accessible to a Vulkan instance. * *
C Specification
* *

To retrieve a list of physical device objects representing the physical devices installed in the system, call:

* *

     * VkResult vkEnumeratePhysicalDevices(
     *     VkInstance                                  instance,
     *     uint32_t*                                   pPhysicalDeviceCount,
     *     VkPhysicalDevice*                           pPhysicalDevices);
* *
Description
* *

If {@code pPhysicalDevices} is {@code NULL}, then the number of physical devices available is returned in {@code pPhysicalDeviceCount}. Otherwise, {@code pPhysicalDeviceCount} must point to a variable set by the user to the number of elements in the {@code pPhysicalDevices} array, and on return the variable is overwritten with the number of handles actually written to {@code pPhysicalDevices}. If {@code pPhysicalDeviceCount} is less than the number of physical devices available, at most {@code pPhysicalDeviceCount} structures will be written, and {@link #VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link #VK_SUCCESS SUCCESS}, to indicate that not all the available physical devices were returned.

* *
Valid Usage (Implicit)
* *
    *
  • {@code instance} must be a valid {@code VkInstance} handle
  • *
  • {@code pPhysicalDeviceCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPhysicalDeviceCount} is not 0, and {@code pPhysicalDevices} is not {@code NULL}, {@code pPhysicalDevices} must be a valid pointer to an array of {@code pPhysicalDeviceCount} {@code VkPhysicalDevice} handles
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_INCOMPLETE INCOMPLETE}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}
  • *
*
* * @param instance a handle to a Vulkan instance previously created with {@link #vkCreateInstance CreateInstance}. * @param pPhysicalDeviceCount a pointer to an integer related to the number of physical devices available or queried, as described below. * @param pPhysicalDevices either {@code NULL} or a pointer to an array of {@code VkPhysicalDevice} handles. */ @NativeType("VkResult") public static int vkEnumeratePhysicalDevices(VkInstance instance, @NativeType("uint32_t *") IntBuffer pPhysicalDeviceCount, @Nullable @NativeType("VkPhysicalDevice *") PointerBuffer pPhysicalDevices) { if (CHECKS) { check(pPhysicalDeviceCount, 1); checkSafe(pPhysicalDevices, pPhysicalDeviceCount.get(pPhysicalDeviceCount.position())); } return nvkEnumeratePhysicalDevices(instance, memAddress(pPhysicalDeviceCount), memAddressSafe(pPhysicalDevices)); } // --- [ vkGetPhysicalDeviceFeatures ] --- /** Unsafe version of: {@link #vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures} */ public static void nvkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, long pFeatures) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceFeatures; callPPV(physicalDevice.address(), pFeatures, __functionAddress); } /** * Reports capabilities of a physical device. * *
C Specification
* *

To query supported features, call:

* *

     * void vkGetPhysicalDeviceFeatures(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkPhysicalDeviceFeatures*                   pFeatures);
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code pFeatures} must be a valid pointer to a {@link VkPhysicalDeviceFeatures} structure
  • *
* *
See Also
* *

{@link VkPhysicalDeviceFeatures}

* * @param physicalDevice the physical device from which to query the supported features. * @param pFeatures a pointer to a {@link VkPhysicalDeviceFeatures} structure in which the physical device features are returned. For each feature, a value of {@link #VK_TRUE TRUE} specifies that the feature is supported on this physical device, and {@link #VK_FALSE FALSE} specifies that the feature is not supported. */ public static void vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, @NativeType("VkPhysicalDeviceFeatures *") VkPhysicalDeviceFeatures pFeatures) { nvkGetPhysicalDeviceFeatures(physicalDevice, pFeatures.address()); } // --- [ vkGetPhysicalDeviceFormatProperties ] --- /** Unsafe version of: {@link #vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties} */ public static void nvkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, int format, long pFormatProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceFormatProperties; callPPV(physicalDevice.address(), format, pFormatProperties, __functionAddress); } /** * Lists physical device’s format capabilities. * *
C Specification
* *

To query supported format features which are properties of the physical device, call:

* *

     * void vkGetPhysicalDeviceFormatProperties(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkFormat                                    format,
     *     VkFormatProperties*                         pFormatProperties);
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code format} must be a valid {@code VkFormat} value
  • *
  • {@code pFormatProperties} must be a valid pointer to a {@link VkFormatProperties} structure
  • *
* *
See Also
* *

{@link VkFormatProperties}

* * @param physicalDevice the physical device from which to query the format properties. * @param format the format whose properties are queried. * @param pFormatProperties a pointer to a {@link VkFormatProperties} structure in which physical device properties for {@code format} are returned. */ public static void vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, @NativeType("VkFormat") int format, @NativeType("VkFormatProperties *") VkFormatProperties pFormatProperties) { nvkGetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties.address()); } // --- [ vkGetPhysicalDeviceImageFormatProperties ] --- /** Unsafe version of: {@link #vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties} */ public static int nvkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int tiling, int usage, int flags, long pImageFormatProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceImageFormatProperties; return callPPI(physicalDevice.address(), format, type, tiling, usage, flags, pImageFormatProperties, __functionAddress); } /** * Lists physical device’s image format capabilities. * *
C Specification
* *

To query additional capabilities specific to image types, call:

* *

     * VkResult vkGetPhysicalDeviceImageFormatProperties(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkFormat                                    format,
     *     VkImageType                                 type,
     *     VkImageTiling                               tiling,
     *     VkImageUsageFlags                           usage,
     *     VkImageCreateFlags                          flags,
     *     VkImageFormatProperties*                    pImageFormatProperties);
* *
Description
* *

The {@code format}, {@code type}, {@code tiling}, {@code usage}, and {@code flags} parameters correspond to parameters that would be consumed by {@link #vkCreateImage CreateImage} (as members of {@link VkImageCreateInfo}).

* *

If {@code format} is not a supported image format, or if the combination of {@code format}, {@code type}, {@code tiling}, {@code usage}, and {@code flags} is not supported for images, then {@code vkGetPhysicalDeviceImageFormatProperties} returns {@link #VK_ERROR_FORMAT_NOT_SUPPORTED ERROR_FORMAT_NOT_SUPPORTED}.

* *

The limitations on an image format that are reported by {@code vkGetPhysicalDeviceImageFormatProperties} have the following property: if {@code usage1} and {@code usage2} of type {@code VkImageUsageFlags} are such that the bits set in {@code usage1} are a subset of the bits set in {@code usage2}, and {@code flags1} and {@code flags2} of type {@code VkImageCreateFlags} are such that the bits set in {@code flags1} are a subset of the bits set in {@code flags2}, then the limitations for {@code usage1} and {@code flags1} must be no more strict than the limitations for {@code usage2} and {@code flags2}, for all values of {@code format}, {@code type}, and {@code tiling}.

* *
Valid Usage
* *
    *
  • {@code tiling} must not be {@link EXTImageDrmFormatModifier#VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT}. (Use {@link VK11#vkGetPhysicalDeviceImageFormatProperties2 GetPhysicalDeviceImageFormatProperties2} instead)
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code format} must be a valid {@code VkFormat} value
  • *
  • {@code type} must be a valid {@code VkImageType} value
  • *
  • {@code tiling} must be a valid {@code VkImageTiling} value
  • *
  • {@code usage} must be a valid combination of {@code VkImageUsageFlagBits} values
  • *
  • {@code usage} must not be 0
  • *
  • {@code flags} must be a valid combination of {@code VkImageCreateFlagBits} values
  • *
  • {@code pImageFormatProperties} must be a valid pointer to a {@link VkImageFormatProperties} structure
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_FORMAT_NOT_SUPPORTED ERROR_FORMAT_NOT_SUPPORTED}
  • *
*
* *
See Also
* *

{@link VkImageFormatProperties}

* * @param physicalDevice the physical device from which to query the image capabilities. * @param format a {@code VkFormat} value specifying the image format, corresponding to {@link VkImageCreateInfo}{@code ::format}. * @param type a {@code VkImageType} value specifying the image type, corresponding to {@link VkImageCreateInfo}{@code ::imageType}. * @param tiling a {@code VkImageTiling} value specifying the image tiling, corresponding to {@link VkImageCreateInfo}{@code ::tiling}. * @param usage a bitmask of {@code VkImageUsageFlagBits} specifying the intended usage of the image, corresponding to {@link VkImageCreateInfo}{@code ::usage}. * @param flags a bitmask of {@code VkImageCreateFlagBits} specifying additional parameters of the image, corresponding to {@link VkImageCreateInfo}{@code ::flags}. * @param pImageFormatProperties a pointer to a {@link VkImageFormatProperties} structure in which capabilities are returned. */ @NativeType("VkResult") public static int vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, @NativeType("VkFormat") int format, @NativeType("VkImageType") int type, @NativeType("VkImageTiling") int tiling, @NativeType("VkImageUsageFlags") int usage, @NativeType("VkImageCreateFlags") int flags, @NativeType("VkImageFormatProperties *") VkImageFormatProperties pImageFormatProperties) { return nvkGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties.address()); } // --- [ vkGetPhysicalDeviceProperties ] --- /** Unsafe version of: {@link #vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties} */ public static void nvkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, long pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceProperties; callPPV(physicalDevice.address(), pProperties, __functionAddress); } /** * Returns properties of a physical device. * *
C Specification
* *

To query general properties of physical devices once enumerated, call:

* *

     * void vkGetPhysicalDeviceProperties(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkPhysicalDeviceProperties*                 pProperties);
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code pProperties} must be a valid pointer to a {@link VkPhysicalDeviceProperties} structure
  • *
* *
See Also
* *

{@link VkPhysicalDeviceProperties}

* * @param physicalDevice the handle to the physical device whose properties will be queried. * @param pProperties a pointer to a {@link VkPhysicalDeviceProperties} structure in which properties are returned. */ public static void vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, @NativeType("VkPhysicalDeviceProperties *") VkPhysicalDeviceProperties pProperties) { nvkGetPhysicalDeviceProperties(physicalDevice, pProperties.address()); } // --- [ vkGetPhysicalDeviceQueueFamilyProperties ] --- /** * Unsafe version of: {@link #vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties} * * @param pQueueFamilyPropertyCount a pointer to an integer related to the number of queue families available or queried, as described below. */ public static void nvkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, long pQueueFamilyPropertyCount, long pQueueFamilyProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceQueueFamilyProperties; callPPPV(physicalDevice.address(), pQueueFamilyPropertyCount, pQueueFamilyProperties, __functionAddress); } /** * Reports properties of the queues of the specified physical device. * *
C Specification
* *

To query properties of queues available on a physical device, call:

* *

     * void vkGetPhysicalDeviceQueueFamilyProperties(
     *     VkPhysicalDevice                            physicalDevice,
     *     uint32_t*                                   pQueueFamilyPropertyCount,
     *     VkQueueFamilyProperties*                    pQueueFamilyProperties);
* *
Description
* *

If {@code pQueueFamilyProperties} is {@code NULL}, then the number of queue families available is returned in {@code pQueueFamilyPropertyCount}. Implementations must support at least one queue family. Otherwise, {@code pQueueFamilyPropertyCount} must point to a variable set by the user to the number of elements in the {@code pQueueFamilyProperties} array, and on return the variable is overwritten with the number of structures actually written to {@code pQueueFamilyProperties}. If {@code pQueueFamilyPropertyCount} is less than the number of queue families available, at most {@code pQueueFamilyPropertyCount} structures will be written.

* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code pQueueFamilyPropertyCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pQueueFamilyPropertyCount} is not 0, and {@code pQueueFamilyProperties} is not {@code NULL}, {@code pQueueFamilyProperties} must be a valid pointer to an array of {@code pQueueFamilyPropertyCount} {@link VkQueueFamilyProperties} structures
  • *
* *
See Also
* *

{@link VkQueueFamilyProperties}

* * @param physicalDevice the handle to the physical device whose properties will be queried. * @param pQueueFamilyPropertyCount a pointer to an integer related to the number of queue families available or queried, as described below. * @param pQueueFamilyProperties either {@code NULL} or a pointer to an array of {@link VkQueueFamilyProperties} structures. */ public static void vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, @NativeType("uint32_t *") IntBuffer pQueueFamilyPropertyCount, @Nullable @NativeType("VkQueueFamilyProperties *") VkQueueFamilyProperties.Buffer pQueueFamilyProperties) { if (CHECKS) { check(pQueueFamilyPropertyCount, 1); checkSafe(pQueueFamilyProperties, pQueueFamilyPropertyCount.get(pQueueFamilyPropertyCount.position())); } nvkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, memAddress(pQueueFamilyPropertyCount), memAddressSafe(pQueueFamilyProperties)); } // --- [ vkGetPhysicalDeviceMemoryProperties ] --- /** Unsafe version of: {@link #vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties} */ public static void nvkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, long pMemoryProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceMemoryProperties; callPPV(physicalDevice.address(), pMemoryProperties, __functionAddress); } /** * Reports memory information for the specified physical device. * *
C Specification
* *

To query memory properties, call:

* *

     * void vkGetPhysicalDeviceMemoryProperties(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkPhysicalDeviceMemoryProperties*           pMemoryProperties);
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code pMemoryProperties} must be a valid pointer to a {@link VkPhysicalDeviceMemoryProperties} structure
  • *
* *
See Also
* *

{@link VkPhysicalDeviceMemoryProperties}

* * @param physicalDevice the handle to the device to query. * @param pMemoryProperties a pointer to a {@link VkPhysicalDeviceMemoryProperties} structure in which the properties are returned. */ public static void vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, @NativeType("VkPhysicalDeviceMemoryProperties *") VkPhysicalDeviceMemoryProperties pMemoryProperties) { nvkGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties.address()); } // --- [ vkGetInstanceProcAddr ] --- /** Unsafe version of: {@link #vkGetInstanceProcAddr GetInstanceProcAddr} */ public static long nvkGetInstanceProcAddr(long instance, long pName) { long __functionAddress = VK.getGlobalCommands().vkGetInstanceProcAddr; return callPPP(instance, pName, __functionAddress); } /** * Return a function pointer for a command. * *
C Specification
* *

Function pointers for all Vulkan commands can be obtained with the command:

* *

     * PFN_vkVoidFunction vkGetInstanceProcAddr(
     *     VkInstance                                  instance,
     *     const char*                                 pName);
* *
Description
* *

{@code vkGetInstanceProcAddr} itself is obtained in a platform- and loader- specific manner. Typically, the loader library will export this command as a function symbol, so applications can link against the loader library, or load it dynamically and look up the symbol using platform-specific APIs.

* *

The table below defines the various use cases for {@code vkGetInstanceProcAddr} and expected return value (“{@code fp}” is “{@code function pointer}”) for each case. A valid returned function pointer (“{@code fp}”) must not be {@code NULL}.

* *

The returned function pointer is of type {@code PFN_vkVoidFunction}, and must be cast to the type of the command being queried before use.

* *
{@code vkGetInstanceProcAddr} behavior
* * * * * * * * * * * * * *
{@code instance}{@code pName}return value
*1{@code NULL}undefined
invalid non-{@code NULL} instance*1undefined
{@code NULL}{@link #vkGetInstanceProcAddr GetInstanceProcAddr}fp5
{@code NULL}global command2fp
instancecore dispatchable commandfp3
instanceenabled instance extension dispatchable command for {@code instance}fp3
instanceavailable device extension4 dispatchable command for {@code instance}fp3
any other case, not covered above{@code NULL}
* *
*
1
*
"*" means any representable value for the parameter (including valid values, invalid values, and {@code NULL}).
*
2
*
The global commands are: {@link VK11#vkEnumerateInstanceVersion EnumerateInstanceVersion}, {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}, {@link #vkEnumerateInstanceLayerProperties EnumerateInstanceLayerProperties}, and {@link #vkCreateInstance CreateInstance}. Dispatchable commands are all other commands which are not global.
*
3
*
The returned function pointer must only be called with a dispatchable object (the first parameter) that is {@code instance} or a child of {@code instance}, e.g. {@code VkInstance}, {@code VkPhysicalDevice}, {@code VkDevice}, {@code VkQueue}, or {@code VkCommandBuffer}.
*
4
*
An “available device extension” is a device extension supported by any physical device enumerated by {@code instance}.
*
5
*
Starting with Vulkan 1.2, {@code vkGetInstanceProcAddr} can resolve itself with a {@code NULL} instance pointer.
*
* *
Valid Usage (Implicit)
* *
    *
  • If {@code instance} is not {@code NULL}, {@code instance} must be a valid {@code VkInstance} handle
  • *
  • {@code pName} must be a null-terminated UTF-8 string
  • *
* * @param instance the instance that the function pointer will be compatible with, or {@code NULL} for commands not dependent on any instance. * @param pName the name of the command to obtain. */ @NativeType("PFN_vkVoidFunction") public static long vkGetInstanceProcAddr(@Nullable VkInstance instance, @NativeType("char const *") ByteBuffer pName) { if (CHECKS) { checkNT1(pName); } return nvkGetInstanceProcAddr(memAddressSafe(instance), memAddress(pName)); } /** * Return a function pointer for a command. * *
C Specification
* *

Function pointers for all Vulkan commands can be obtained with the command:

* *

     * PFN_vkVoidFunction vkGetInstanceProcAddr(
     *     VkInstance                                  instance,
     *     const char*                                 pName);
* *
Description
* *

{@code vkGetInstanceProcAddr} itself is obtained in a platform- and loader- specific manner. Typically, the loader library will export this command as a function symbol, so applications can link against the loader library, or load it dynamically and look up the symbol using platform-specific APIs.

* *

The table below defines the various use cases for {@code vkGetInstanceProcAddr} and expected return value (“{@code fp}” is “{@code function pointer}”) for each case. A valid returned function pointer (“{@code fp}”) must not be {@code NULL}.

* *

The returned function pointer is of type {@code PFN_vkVoidFunction}, and must be cast to the type of the command being queried before use.

* *
{@code vkGetInstanceProcAddr} behavior
* * * * * * * * * * * * * *
{@code instance}{@code pName}return value
*1{@code NULL}undefined
invalid non-{@code NULL} instance*1undefined
{@code NULL}{@link #vkGetInstanceProcAddr GetInstanceProcAddr}fp5
{@code NULL}global command2fp
instancecore dispatchable commandfp3
instanceenabled instance extension dispatchable command for {@code instance}fp3
instanceavailable device extension4 dispatchable command for {@code instance}fp3
any other case, not covered above{@code NULL}
* *
*
1
*
"*" means any representable value for the parameter (including valid values, invalid values, and {@code NULL}).
*
2
*
The global commands are: {@link VK11#vkEnumerateInstanceVersion EnumerateInstanceVersion}, {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}, {@link #vkEnumerateInstanceLayerProperties EnumerateInstanceLayerProperties}, and {@link #vkCreateInstance CreateInstance}. Dispatchable commands are all other commands which are not global.
*
3
*
The returned function pointer must only be called with a dispatchable object (the first parameter) that is {@code instance} or a child of {@code instance}, e.g. {@code VkInstance}, {@code VkPhysicalDevice}, {@code VkDevice}, {@code VkQueue}, or {@code VkCommandBuffer}.
*
4
*
An “available device extension” is a device extension supported by any physical device enumerated by {@code instance}.
*
5
*
Starting with Vulkan 1.2, {@code vkGetInstanceProcAddr} can resolve itself with a {@code NULL} instance pointer.
*
* *
Valid Usage (Implicit)
* *
    *
  • If {@code instance} is not {@code NULL}, {@code instance} must be a valid {@code VkInstance} handle
  • *
  • {@code pName} must be a null-terminated UTF-8 string
  • *
* * @param instance the instance that the function pointer will be compatible with, or {@code NULL} for commands not dependent on any instance. * @param pName the name of the command to obtain. */ @NativeType("PFN_vkVoidFunction") public static long vkGetInstanceProcAddr(@Nullable VkInstance instance, @NativeType("char const *") CharSequence pName) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nASCII(pName, true); long pNameEncoded = stack.getPointerAddress(); return nvkGetInstanceProcAddr(memAddressSafe(instance), pNameEncoded); } finally { stack.setPointer(stackPointer); } } // --- [ vkGetDeviceProcAddr ] --- /** Unsafe version of: {@link #vkGetDeviceProcAddr GetDeviceProcAddr} */ public static long nvkGetDeviceProcAddr(VkDevice device, long pName) { long __functionAddress = device.getCapabilities().vkGetDeviceProcAddr; return callPPP(device.address(), pName, __functionAddress); } /** * Return a function pointer for a command. * *
C Specification
* *

In order to support systems with multiple Vulkan implementations, the function pointers returned by {@code vkGetInstanceProcAddr} may point to dispatch code that calls a different real implementation for different {@code VkDevice} objects or their child objects. The overhead of the internal dispatch for {@code VkDevice} objects can be avoided by obtaining device-specific function pointers for any commands that use a device or device-child object as their dispatchable object. Such function pointers can be obtained with the command:

* *

     * PFN_vkVoidFunction vkGetDeviceProcAddr(
     *     VkDevice                                    device,
     *     const char*                                 pName);
* *
Description
* *

The returned function pointer is of type {@code PFN_vkVoidFunction}, and must be cast to the type of the command being queried before use. The function pointer must only be called with a dispatchable object (the first parameter) that is {@code device} or a child of {@code device}.

* *
{@code vkGetDeviceProcAddr} behavior
* * * * * * * * * * * *
{@code device}{@code pName}return value
{@code NULL}*1undefined
invalid device*1undefined
device{@code NULL}undefined
devicecore device-level dispatchable command2fp3
deviceenabled extension device-level dispatchable command2fp3
any other case, not covered above{@code NULL}
* *
*
1
*
"*" means any representable value for the parameter (including valid values, invalid values, and {@code NULL}).
*
2
*
In this function, device-level excludes all physical-device-level commands.
*
3
*
The returned function pointer must only be called with a dispatchable object (the first parameter) that is {@code device} or a child of {@code device} e.g. {@code VkDevice}, {@code VkQueue}, or {@code VkCommandBuffer}.
*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pName} must be a null-terminated UTF-8 string
  • *
*/ @NativeType("PFN_vkVoidFunction") public static long vkGetDeviceProcAddr(VkDevice device, @NativeType("char const *") ByteBuffer pName) { if (CHECKS) { checkNT1(pName); } return nvkGetDeviceProcAddr(device, memAddress(pName)); } /** * Return a function pointer for a command. * *
C Specification
* *

In order to support systems with multiple Vulkan implementations, the function pointers returned by {@code vkGetInstanceProcAddr} may point to dispatch code that calls a different real implementation for different {@code VkDevice} objects or their child objects. The overhead of the internal dispatch for {@code VkDevice} objects can be avoided by obtaining device-specific function pointers for any commands that use a device or device-child object as their dispatchable object. Such function pointers can be obtained with the command:

* *

     * PFN_vkVoidFunction vkGetDeviceProcAddr(
     *     VkDevice                                    device,
     *     const char*                                 pName);
* *
Description
* *

The returned function pointer is of type {@code PFN_vkVoidFunction}, and must be cast to the type of the command being queried before use. The function pointer must only be called with a dispatchable object (the first parameter) that is {@code device} or a child of {@code device}.

* *
{@code vkGetDeviceProcAddr} behavior
* * * * * * * * * * * *
{@code device}{@code pName}return value
{@code NULL}*1undefined
invalid device*1undefined
device{@code NULL}undefined
devicecore device-level dispatchable command2fp3
deviceenabled extension device-level dispatchable command2fp3
any other case, not covered above{@code NULL}
* *
*
1
*
"*" means any representable value for the parameter (including valid values, invalid values, and {@code NULL}).
*
2
*
In this function, device-level excludes all physical-device-level commands.
*
3
*
The returned function pointer must only be called with a dispatchable object (the first parameter) that is {@code device} or a child of {@code device} e.g. {@code VkDevice}, {@code VkQueue}, or {@code VkCommandBuffer}.
*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pName} must be a null-terminated UTF-8 string
  • *
*/ @NativeType("PFN_vkVoidFunction") public static long vkGetDeviceProcAddr(VkDevice device, @NativeType("char const *") CharSequence pName) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nASCII(pName, true); long pNameEncoded = stack.getPointerAddress(); return nvkGetDeviceProcAddr(device, pNameEncoded); } finally { stack.setPointer(stackPointer); } } // --- [ vkCreateDevice ] --- /** Unsafe version of: {@link #vkCreateDevice CreateDevice} */ public static int nvkCreateDevice(VkPhysicalDevice physicalDevice, long pCreateInfo, long pAllocator, long pDevice) { long __functionAddress = physicalDevice.getCapabilities().vkCreateDevice; if (CHECKS) { VkDeviceCreateInfo.validate(pCreateInfo); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(physicalDevice.address(), pCreateInfo, pAllocator, pDevice, __functionAddress); } /** * Create a new device instance. * *
C Specification
* *

A logical device is created as a connection to a physical device. To create a logical device, call:

* *

     * VkResult vkCreateDevice(
     *     VkPhysicalDevice                            physicalDevice,
     *     const VkDeviceCreateInfo*                   pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkDevice*                                   pDevice);
* *
Description
* *

{@code vkCreateDevice} verifies that extensions and features requested in the {@code ppEnabledExtensionNames} and {@code pEnabledFeatures} members of {@code pCreateInfo}, respectively, are supported by the implementation. If any requested extension is not supported, {@code vkCreateDevice} must return {@link #VK_ERROR_EXTENSION_NOT_PRESENT ERROR_EXTENSION_NOT_PRESENT}. If any requested feature is not supported, {@code vkCreateDevice} must return {@link #VK_ERROR_FEATURE_NOT_PRESENT ERROR_FEATURE_NOT_PRESENT}. Support for extensions can be checked before creating a device by querying {@link #vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties}. Support for features can similarly be checked by querying {@link #vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures}.

* *

After verifying and enabling the extensions the {@code VkDevice} object is created and returned to the application.

* *

Multiple logical devices can be created from the same physical device. Logical device creation may fail due to lack of device-specific resources (in addition to other errors). If that occurs, {@code vkCreateDevice} will return {@link #VK_ERROR_TOO_MANY_OBJECTS ERROR_TOO_MANY_OBJECTS}.

* *
Valid Usage
* *
    *
  • All required device extensions for each extension in the {@link VkDeviceCreateInfo}{@code ::ppEnabledExtensionNames} list must also be present in that list
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkDeviceCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pDevice} must be a valid pointer to a {@code VkDevice} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}
  • *
  • {@link #VK_ERROR_EXTENSION_NOT_PRESENT ERROR_EXTENSION_NOT_PRESENT}
  • *
  • {@link #VK_ERROR_FEATURE_NOT_PRESENT ERROR_FEATURE_NOT_PRESENT}
  • *
  • {@link #VK_ERROR_TOO_MANY_OBJECTS ERROR_TOO_MANY_OBJECTS}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkDeviceCreateInfo}

* * @param physicalDevice must be one of the device handles returned from a call to {@code vkEnumeratePhysicalDevices} (see Physical Device Enumeration). * @param pCreateInfo a pointer to a {@link VkDeviceCreateInfo} structure containing information about how to create the device. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pDevice a pointer to a handle in which the created {@code VkDevice} is returned. */ @NativeType("VkResult") public static int vkCreateDevice(VkPhysicalDevice physicalDevice, @NativeType("VkDeviceCreateInfo const *") VkDeviceCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkDevice *") PointerBuffer pDevice) { if (CHECKS) { check(pDevice, 1); } return nvkCreateDevice(physicalDevice, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pDevice)); } // --- [ vkDestroyDevice ] --- /** Unsafe version of: {@link #vkDestroyDevice DestroyDevice} */ public static void nvkDestroyDevice(VkDevice device, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyDevice; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPPV(device.address(), pAllocator, __functionAddress); } /** * Destroy a logical device. * *
C Specification
* *

To destroy a device, call:

* *

     * void vkDestroyDevice(
     *     VkDevice                                    device,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Description
* *

To ensure that no work is active on the device, {@link #vkDeviceWaitIdle DeviceWaitIdle} can be used to gate the destruction of the device. Prior to destroying a device, an application is responsible for destroying/freeing any Vulkan objects that were created using that device as the first parameter of the corresponding {@code vkCreate*} or {@code vkAllocate*} command.

* *
Note
* *

The lifetime of each of these objects is bound by the lifetime of the {@code VkDevice} object. Therefore, to avoid resource leaks, it is critical that an application explicitly free all of these resources prior to calling {@code vkDestroyDevice}.

*
* *
Valid Usage
* *
    *
  • All child objects created on {@code device} must have been destroyed prior to destroying {@code device}
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code device} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code device} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • If {@code device} is not {@code NULL}, {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code device} must be externally synchronized
  • *
  • Host access to all {@code VkQueue} objects created from {@code device} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyDevice(VkDevice device, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyDevice(device, memAddressSafe(pAllocator)); } // --- [ vkEnumerateInstanceExtensionProperties ] --- /** * Unsafe version of: {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties} * * @param pPropertyCount a pointer to an integer related to the number of extension properties available or queried, as described below. */ public static int nvkEnumerateInstanceExtensionProperties(long pLayerName, long pPropertyCount, long pProperties) { long __functionAddress = VK.getGlobalCommands().vkEnumerateInstanceExtensionProperties; return callPPPI(pLayerName, pPropertyCount, pProperties, __functionAddress); } /** * Returns up to requested number of global extension properties. * *
C Specification
* *

To query the available instance extensions, call:

* *

     * VkResult vkEnumerateInstanceExtensionProperties(
     *     const char*                                 pLayerName,
     *     uint32_t*                                   pPropertyCount,
     *     VkExtensionProperties*                      pProperties);
* *
Description
* *

When {@code pLayerName} parameter is {@code NULL}, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned. When {@code pLayerName} is the name of a layer, the instance extensions provided by that layer are returned.

* *

If {@code pProperties} is {@code NULL}, then the number of extensions properties available is returned in {@code pPropertyCount}. Otherwise, {@code pPropertyCount} must point to a variable set by the user to the number of elements in the {@code pProperties} array, and on return the variable is overwritten with the number of structures actually written to {@code pProperties}. If {@code pPropertyCount} is less than the number of extension properties available, at most {@code pPropertyCount} structures will be written, and {@link #VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link #VK_SUCCESS SUCCESS}, to indicate that not all the available properties were returned.

* *

Because the list of available layers may change externally between calls to {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}, two calls may retrieve different results if a {@code pLayerName} is available in one call but not in another. The extensions supported by a layer may also change between two calls, e.g. if the layer implementation is replaced by a different version between those calls.

* *

Implementations must not advertise any pair of extensions that cannot be enabled together due to behavioral differences, or any extension that cannot be enabled against the advertised version.

* *
Valid Usage (Implicit)
* *
    *
  • If {@code pLayerName} is not {@code NULL}, {@code pLayerName} must be a null-terminated UTF-8 string
  • *
  • {@code pPropertyCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPropertyCount} is not 0, and {@code pProperties} is not {@code NULL}, {@code pProperties} must be a valid pointer to an array of {@code pPropertyCount} {@link VkExtensionProperties} structures
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_INCOMPLETE INCOMPLETE}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_LAYER_NOT_PRESENT ERROR_LAYER_NOT_PRESENT}
  • *
*
* *
See Also
* *

{@link VkExtensionProperties}

* * @param pLayerName either {@code NULL} or a pointer to a null-terminated UTF-8 string naming the layer to retrieve extensions from. * @param pPropertyCount a pointer to an integer related to the number of extension properties available or queried, as described below. * @param pProperties either {@code NULL} or a pointer to an array of {@link VkExtensionProperties} structures. */ @NativeType("VkResult") public static int vkEnumerateInstanceExtensionProperties(@Nullable @NativeType("char const *") ByteBuffer pLayerName, @NativeType("uint32_t *") IntBuffer pPropertyCount, @Nullable @NativeType("VkExtensionProperties *") VkExtensionProperties.Buffer pProperties) { if (CHECKS) { checkNT1Safe(pLayerName); check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount.get(pPropertyCount.position())); } return nvkEnumerateInstanceExtensionProperties(memAddressSafe(pLayerName), memAddress(pPropertyCount), memAddressSafe(pProperties)); } /** * Returns up to requested number of global extension properties. * *
C Specification
* *

To query the available instance extensions, call:

* *

     * VkResult vkEnumerateInstanceExtensionProperties(
     *     const char*                                 pLayerName,
     *     uint32_t*                                   pPropertyCount,
     *     VkExtensionProperties*                      pProperties);
* *
Description
* *

When {@code pLayerName} parameter is {@code NULL}, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned. When {@code pLayerName} is the name of a layer, the instance extensions provided by that layer are returned.

* *

If {@code pProperties} is {@code NULL}, then the number of extensions properties available is returned in {@code pPropertyCount}. Otherwise, {@code pPropertyCount} must point to a variable set by the user to the number of elements in the {@code pProperties} array, and on return the variable is overwritten with the number of structures actually written to {@code pProperties}. If {@code pPropertyCount} is less than the number of extension properties available, at most {@code pPropertyCount} structures will be written, and {@link #VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link #VK_SUCCESS SUCCESS}, to indicate that not all the available properties were returned.

* *

Because the list of available layers may change externally between calls to {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}, two calls may retrieve different results if a {@code pLayerName} is available in one call but not in another. The extensions supported by a layer may also change between two calls, e.g. if the layer implementation is replaced by a different version between those calls.

* *

Implementations must not advertise any pair of extensions that cannot be enabled together due to behavioral differences, or any extension that cannot be enabled against the advertised version.

* *
Valid Usage (Implicit)
* *
    *
  • If {@code pLayerName} is not {@code NULL}, {@code pLayerName} must be a null-terminated UTF-8 string
  • *
  • {@code pPropertyCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPropertyCount} is not 0, and {@code pProperties} is not {@code NULL}, {@code pProperties} must be a valid pointer to an array of {@code pPropertyCount} {@link VkExtensionProperties} structures
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_INCOMPLETE INCOMPLETE}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_LAYER_NOT_PRESENT ERROR_LAYER_NOT_PRESENT}
  • *
*
* *
See Also
* *

{@link VkExtensionProperties}

* * @param pLayerName either {@code NULL} or a pointer to a null-terminated UTF-8 string naming the layer to retrieve extensions from. * @param pPropertyCount a pointer to an integer related to the number of extension properties available or queried, as described below. * @param pProperties either {@code NULL} or a pointer to an array of {@link VkExtensionProperties} structures. */ @NativeType("VkResult") public static int vkEnumerateInstanceExtensionProperties(@Nullable @NativeType("char const *") CharSequence pLayerName, @NativeType("uint32_t *") IntBuffer pPropertyCount, @Nullable @NativeType("VkExtensionProperties *") VkExtensionProperties.Buffer pProperties) { if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount.get(pPropertyCount.position())); } MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nUTF8Safe(pLayerName, true); long pLayerNameEncoded = pLayerName == null ? NULL : stack.getPointerAddress(); return nvkEnumerateInstanceExtensionProperties(pLayerNameEncoded, memAddress(pPropertyCount), memAddressSafe(pProperties)); } finally { stack.setPointer(stackPointer); } } // --- [ vkEnumerateDeviceExtensionProperties ] --- /** * Unsafe version of: {@link #vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties} * * @param pPropertyCount a pointer to an integer related to the number of extension properties available or queried, and is treated in the same fashion as the {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}{@code ::pPropertyCount} parameter. */ public static int nvkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, long pLayerName, long pPropertyCount, long pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkEnumerateDeviceExtensionProperties; return callPPPPI(physicalDevice.address(), pLayerName, pPropertyCount, pProperties, __functionAddress); } /** * Returns properties of available physical device extensions. * *
C Specification
* *

To query the extensions available to a given physical device, call:

* *

     * VkResult vkEnumerateDeviceExtensionProperties(
     *     VkPhysicalDevice                            physicalDevice,
     *     const char*                                 pLayerName,
     *     uint32_t*                                   pPropertyCount,
     *     VkExtensionProperties*                      pProperties);
* *
Description
* *

When {@code pLayerName} parameter is {@code NULL}, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned. When {@code pLayerName} is the name of a layer, the device extensions provided by that layer are returned.

* *

Implementations must not advertise any pair of extensions that cannot be enabled together due to behavioral differences, or any extension that cannot be enabled against the advertised version.

* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • If {@code pLayerName} is not {@code NULL}, {@code pLayerName} must be a null-terminated UTF-8 string
  • *
  • {@code pPropertyCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPropertyCount} is not 0, and {@code pProperties} is not {@code NULL}, {@code pProperties} must be a valid pointer to an array of {@code pPropertyCount} {@link VkExtensionProperties} structures
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_INCOMPLETE INCOMPLETE}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_LAYER_NOT_PRESENT ERROR_LAYER_NOT_PRESENT}
  • *
*
* *
See Also
* *

{@link VkExtensionProperties}

* * @param physicalDevice the physical device that will be queried. * @param pLayerName either {@code NULL} or a pointer to a null-terminated UTF-8 string naming the layer to retrieve extensions from. * @param pPropertyCount a pointer to an integer related to the number of extension properties available or queried, and is treated in the same fashion as the {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}{@code ::pPropertyCount} parameter. * @param pProperties either {@code NULL} or a pointer to an array of {@link VkExtensionProperties} structures. */ @NativeType("VkResult") public static int vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, @Nullable @NativeType("char const *") ByteBuffer pLayerName, @NativeType("uint32_t *") IntBuffer pPropertyCount, @Nullable @NativeType("VkExtensionProperties *") VkExtensionProperties.Buffer pProperties) { if (CHECKS) { checkNT1Safe(pLayerName); check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount.get(pPropertyCount.position())); } return nvkEnumerateDeviceExtensionProperties(physicalDevice, memAddressSafe(pLayerName), memAddress(pPropertyCount), memAddressSafe(pProperties)); } /** * Returns properties of available physical device extensions. * *
C Specification
* *

To query the extensions available to a given physical device, call:

* *

     * VkResult vkEnumerateDeviceExtensionProperties(
     *     VkPhysicalDevice                            physicalDevice,
     *     const char*                                 pLayerName,
     *     uint32_t*                                   pPropertyCount,
     *     VkExtensionProperties*                      pProperties);
* *
Description
* *

When {@code pLayerName} parameter is {@code NULL}, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned. When {@code pLayerName} is the name of a layer, the device extensions provided by that layer are returned.

* *

Implementations must not advertise any pair of extensions that cannot be enabled together due to behavioral differences, or any extension that cannot be enabled against the advertised version.

* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • If {@code pLayerName} is not {@code NULL}, {@code pLayerName} must be a null-terminated UTF-8 string
  • *
  • {@code pPropertyCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPropertyCount} is not 0, and {@code pProperties} is not {@code NULL}, {@code pProperties} must be a valid pointer to an array of {@code pPropertyCount} {@link VkExtensionProperties} structures
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_INCOMPLETE INCOMPLETE}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_LAYER_NOT_PRESENT ERROR_LAYER_NOT_PRESENT}
  • *
*
* *
See Also
* *

{@link VkExtensionProperties}

* * @param physicalDevice the physical device that will be queried. * @param pLayerName either {@code NULL} or a pointer to a null-terminated UTF-8 string naming the layer to retrieve extensions from. * @param pPropertyCount a pointer to an integer related to the number of extension properties available or queried, and is treated in the same fashion as the {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}{@code ::pPropertyCount} parameter. * @param pProperties either {@code NULL} or a pointer to an array of {@link VkExtensionProperties} structures. */ @NativeType("VkResult") public static int vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, @Nullable @NativeType("char const *") CharSequence pLayerName, @NativeType("uint32_t *") IntBuffer pPropertyCount, @Nullable @NativeType("VkExtensionProperties *") VkExtensionProperties.Buffer pProperties) { if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount.get(pPropertyCount.position())); } MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nUTF8Safe(pLayerName, true); long pLayerNameEncoded = pLayerName == null ? NULL : stack.getPointerAddress(); return nvkEnumerateDeviceExtensionProperties(physicalDevice, pLayerNameEncoded, memAddress(pPropertyCount), memAddressSafe(pProperties)); } finally { stack.setPointer(stackPointer); } } // --- [ vkEnumerateInstanceLayerProperties ] --- /** * Unsafe version of: {@link #vkEnumerateInstanceLayerProperties EnumerateInstanceLayerProperties} * * @param pPropertyCount a pointer to an integer related to the number of layer properties available or queried, as described below. */ public static int nvkEnumerateInstanceLayerProperties(long pPropertyCount, long pProperties) { long __functionAddress = VK.getGlobalCommands().vkEnumerateInstanceLayerProperties; return callPPI(pPropertyCount, pProperties, __functionAddress); } /** * Returns up to requested number of global layer properties. * *
C Specification
* *

To query the available layers, call:

* *

     * VkResult vkEnumerateInstanceLayerProperties(
     *     uint32_t*                                   pPropertyCount,
     *     VkLayerProperties*                          pProperties);
* *
Description
* *

If {@code pProperties} is {@code NULL}, then the number of layer properties available is returned in {@code pPropertyCount}. Otherwise, {@code pPropertyCount} must point to a variable set by the user to the number of elements in the {@code pProperties} array, and on return the variable is overwritten with the number of structures actually written to {@code pProperties}. If {@code pPropertyCount} is less than the number of layer properties available, at most {@code pPropertyCount} structures will be written, and {@link #VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link #VK_SUCCESS SUCCESS}, to indicate that not all the available properties were returned.

* *

The list of available layers may change at any time due to actions outside of the Vulkan implementation, so two calls to {@code vkEnumerateInstanceLayerProperties} with the same parameters may return different results, or retrieve different {@code pPropertyCount} values or {@code pProperties} contents. Once an instance has been created, the layers enabled for that instance will continue to be enabled and valid for the lifetime of that instance, even if some of them become unavailable for future instances.

* *
Valid Usage (Implicit)
* *
    *
  • {@code pPropertyCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPropertyCount} is not 0, and {@code pProperties} is not {@code NULL}, {@code pProperties} must be a valid pointer to an array of {@code pPropertyCount} {@link VkLayerProperties} structures
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_INCOMPLETE INCOMPLETE}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkLayerProperties}

* * @param pPropertyCount a pointer to an integer related to the number of layer properties available or queried, as described below. * @param pProperties either {@code NULL} or a pointer to an array of {@link VkLayerProperties} structures. */ @NativeType("VkResult") public static int vkEnumerateInstanceLayerProperties(@NativeType("uint32_t *") IntBuffer pPropertyCount, @Nullable @NativeType("VkLayerProperties *") VkLayerProperties.Buffer pProperties) { if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount.get(pPropertyCount.position())); } return nvkEnumerateInstanceLayerProperties(memAddress(pPropertyCount), memAddressSafe(pProperties)); } // --- [ vkEnumerateDeviceLayerProperties ] --- /** * Unsafe version of: {@link #vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties} * * @param pPropertyCount a pointer to an integer related to the number of layer properties available or queried. */ public static int nvkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, long pPropertyCount, long pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkEnumerateDeviceLayerProperties; return callPPPI(physicalDevice.address(), pPropertyCount, pProperties, __functionAddress); } /** * Returns properties of available physical device layers. * *
C Specification
* *

To enumerate device layers, call:

* *

     * VkResult vkEnumerateDeviceLayerProperties(
     *     VkPhysicalDevice                            physicalDevice,
     *     uint32_t*                                   pPropertyCount,
     *     VkLayerProperties*                          pProperties);
* *
Description
* *

If {@code pProperties} is {@code NULL}, then the number of layer properties available is returned in {@code pPropertyCount}. Otherwise, {@code pPropertyCount} must point to a variable set by the user to the number of elements in the {@code pProperties} array, and on return the variable is overwritten with the number of structures actually written to {@code pProperties}. If {@code pPropertyCount} is less than the number of layer properties available, at most {@code pPropertyCount} structures will be written, and {@link #VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link #VK_SUCCESS SUCCESS}, to indicate that not all the available properties were returned.

* *

The list of layers enumerated by {@code vkEnumerateDeviceLayerProperties} must be exactly the sequence of layers enabled for the instance. The members of {@link VkLayerProperties} for each enumerated layer must be the same as the properties when the layer was enumerated by {@code vkEnumerateInstanceLayerProperties}.

* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code pPropertyCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPropertyCount} is not 0, and {@code pProperties} is not {@code NULL}, {@code pProperties} must be a valid pointer to an array of {@code pPropertyCount} {@link VkLayerProperties} structures
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_INCOMPLETE INCOMPLETE}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkLayerProperties}

* * @param pPropertyCount a pointer to an integer related to the number of layer properties available or queried. * @param pProperties either {@code NULL} or a pointer to an array of {@link VkLayerProperties} structures. */ @NativeType("VkResult") public static int vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, @NativeType("uint32_t *") IntBuffer pPropertyCount, @Nullable @NativeType("VkLayerProperties *") VkLayerProperties.Buffer pProperties) { if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount.get(pPropertyCount.position())); } return nvkEnumerateDeviceLayerProperties(physicalDevice, memAddress(pPropertyCount), memAddressSafe(pProperties)); } // --- [ vkGetDeviceQueue ] --- /** Unsafe version of: {@link #vkGetDeviceQueue GetDeviceQueue} */ public static void nvkGetDeviceQueue(VkDevice device, int queueFamilyIndex, int queueIndex, long pQueue) { long __functionAddress = device.getCapabilities().vkGetDeviceQueue; callPPV(device.address(), queueFamilyIndex, queueIndex, pQueue, __functionAddress); } /** * Get a queue handle from a device. * *
C Specification
* *

To retrieve a handle to a {@code VkQueue} object, call:

* *

     * void vkGetDeviceQueue(
     *     VkDevice                                    device,
     *     uint32_t                                    queueFamilyIndex,
     *     uint32_t                                    queueIndex,
     *     VkQueue*                                    pQueue);
* *
Description
* *

{@code vkGetDeviceQueue} must only be used to get queues that were created with the {@code flags} parameter of {@link VkDeviceQueueCreateInfo} set to zero. To get queues that were created with a non-zero {@code flags} parameter use {@link VK11#vkGetDeviceQueue2 GetDeviceQueue2}.

* *
Valid Usage
* *
    *
  • {@code queueFamilyIndex} must be one of the queue family indices specified when {@code device} was created, via the {@link VkDeviceQueueCreateInfo} structure
  • *
  • {@code queueIndex} must be less than the value of {@link VkDeviceQueueCreateInfo}{@code ::queueCount} for the queue family indicated by {@code queueFamilyIndex} when {@code device} was created
  • *
  • {@link VkDeviceQueueCreateInfo}{@code ::flags} must have been set to zero when {@code device} was created
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pQueue} must be a valid pointer to a {@code VkQueue} handle
  • *
* * @param device the logical device that owns the queue. * @param queueFamilyIndex the index of the queue family to which the queue belongs. * @param queueIndex the index within this queue family of the queue to retrieve. * @param pQueue a pointer to a {@code VkQueue} object that will be filled with the handle for the requested queue. */ public static void vkGetDeviceQueue(VkDevice device, @NativeType("uint32_t") int queueFamilyIndex, @NativeType("uint32_t") int queueIndex, @NativeType("VkQueue *") PointerBuffer pQueue) { if (CHECKS) { check(pQueue, 1); } nvkGetDeviceQueue(device, queueFamilyIndex, queueIndex, memAddress(pQueue)); } // --- [ vkQueueSubmit ] --- /** * Unsafe version of: {@link #vkQueueSubmit QueueSubmit} * * @param submitCount the number of elements in the {@code pSubmits} array. */ public static int nvkQueueSubmit(VkQueue queue, int submitCount, long pSubmits, long fence) { long __functionAddress = queue.getCapabilities().vkQueueSubmit; if (CHECKS) { if (pSubmits != NULL) { Struct.validate(pSubmits, submitCount, VkSubmitInfo.SIZEOF, VkSubmitInfo::validate); } } return callPPJI(queue.address(), submitCount, pSubmits, fence, __functionAddress); } /** * Submits a sequence of semaphores or command buffers to a queue. * *
C Specification
* *

To submit command buffers to a queue, call:

* *

     * VkResult vkQueueSubmit(
     *     VkQueue                                     queue,
     *     uint32_t                                    submitCount,
     *     const VkSubmitInfo*                         pSubmits,
     *     VkFence                                     fence);
* *
Description
* *

{@code vkQueueSubmit} is a queue submission command, with each batch defined by an element of {@code pSubmits}. Batches begin execution in the order they appear in {@code pSubmits}, but may complete out of order.

* *

Fence and semaphore operations submitted with {@link #vkQueueSubmit QueueSubmit} have additional ordering constraints compared to other submission commands, with dependencies involving previous and subsequent queue operations. Information about these additional constraints can be found in the semaphore and fence sections of the synchronization chapter.

* *

Details on the interaction of {@code pWaitDstStageMask} with synchronization are described in the semaphore wait operation section of the synchronization chapter.

* *

The order that batches appear in {@code pSubmits} is used to determine submission order, and thus all the implicit ordering guarantees that respect it. Other than these implicit ordering guarantees and any explicit synchronization primitives, these batches may overlap or otherwise execute out of order.

* *

If any command buffer submitted to this queue is in the executable state, it is moved to the pending state. Once execution of all submissions of a command buffer complete, it moves from the pending state, back to the executable state. If a command buffer was recorded with the {@link #VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT} flag, it instead moves to the invalid state.

* *

If {@code vkQueueSubmit} fails, it may return {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY} or {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}. If it does, the implementation must ensure that the state and contents of any resources or synchronization primitives referenced by the submitted command buffers and any semaphores referenced by {@code pSubmits} is unaffected by the call or its failure. If {@code vkQueueSubmit} fails in such a way that the implementation is unable to make that guarantee, the implementation must return {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}. See Lost Device.

* *
Valid Usage
* *
    *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be unsignaled
  • *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must not be associated with any other queue command that has not yet completed execution on that queue
  • *
  • Any calls to {@link #vkCmdSetEvent CmdSetEvent}, {@link #vkCmdResetEvent CmdResetEvent} or {@link #vkCmdWaitEvents CmdWaitEvents} that have been recorded into any of the command buffer elements of the {@code pCommandBuffers} member of any element of {@code pSubmits}, must not reference any {@code VkEvent} that is referenced by any of those commands in a command buffer that has been submitted to another queue and is still in the pending state
  • *
  • Any stage flag included in any element of the {@code pWaitDstStageMask} member of any element of {@code pSubmits} must be a pipeline stage supported by one of the capabilities of {@code queue}, as specified in the table of supported pipeline stages
  • *
  • Each binary semaphore element of the {@code pSignalSemaphores} member of any element of {@code pSubmits} must be unsignaled when the semaphore signal operation it defines is executed on the device
  • *
  • When a semaphore wait operation referring to a binary semaphore defined by any element of the {@code pWaitSemaphores} member of any element of {@code pSubmits} executes on {@code queue}, there must be no other queues waiting on the same semaphore
  • *
  • All elements of the {@code pWaitSemaphores} member of all elements of {@code pSubmits} created with a {@code VkSemaphoreType} of {@link VK12#VK_SEMAPHORE_TYPE_BINARY SEMAPHORE_TYPE_BINARY} must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution
  • *
  • Each element of the {@code pCommandBuffers} member of each element of {@code pSubmits} must be in the pending or executable state
  • *
  • If any element of the {@code pCommandBuffers} member of any element of {@code pSubmits} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT}, it must not be in the pending state
  • *
  • Any secondary command buffers recorded into any element of the {@code pCommandBuffers} member of any element of {@code pSubmits} must be in the pending or executable state
  • *
  • If any secondary command buffers recorded into any element of the {@code pCommandBuffers} member of any element of {@code pSubmits} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT}, it must not be in the pending state
  • *
  • Each element of the {@code pCommandBuffers} member of each element of {@code pSubmits} must have been allocated from a {@code VkCommandPool} that was created for the same queue family {@code queue} belongs to
  • *
  • If any element of {@code pSubmits→pCommandBuffers} includes a Queue Family Transfer Acquire Operation, there must exist a previously submitted Queue Family Transfer Release Operation on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such acquire operations, and which happens-before the acquire operation
  • *
  • If a command recorded into any element of {@code pCommandBuffers} was a {@link #vkCmdBeginQuery CmdBeginQuery} whose {@code queryPool} was created with a {@code queryType} of {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, the profiling lock must have been held continuously on the {@code VkDevice} that {@code queue} was retrieved from, throughout recording of those command buffers
  • *
  • Any resource created with {@link #VK_SHARING_MODE_EXCLUSIVE SHARING_MODE_EXCLUSIVE} that is read by an operation specified by {@code pSubmits} must not be owned by any queue family other than the one which {@code queue} belongs to, at the time it is executed
  • *
  • Any resource created with {@link #VK_SHARING_MODE_CONCURRENT SHARING_MODE_CONCURRENT} that is accessed by an operation specified by {@code pSubmits} must have included the queue family of {@code queue} at resource creation time
  • *
  • If {@code queue} was not created with {@link VK11#VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT DEVICE_QUEUE_CREATE_PROTECTED_BIT}, there must be no element of {@code pSubmits} that includes an {@link VkProtectedSubmitInfo} structure in its {@code pNext} chain with {@code protectedSubmit} equal to {@link #VK_TRUE TRUE}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code queue} must be a valid {@code VkQueue} handle
  • *
  • If {@code submitCount} is not 0, {@code pSubmits} must be a valid pointer to an array of {@code submitCount} valid {@link VkSubmitInfo} structures
  • *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be a valid {@code VkFence} handle
  • *
  • Both of {@code fence}, and {@code queue} that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code queue} must be externally synchronized
  • *
  • Host access to {@code fence} must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
--Any
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* *
See Also
* *

{@link VkSubmitInfo}

* * @param queue the queue that the command buffers will be submitted to. * @param pSubmits a pointer to an array of {@link VkSubmitInfo} structures, each specifying a command buffer submission batch. * @param fence an optional handle to a fence to be signaled once all submitted command buffers have completed execution. If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, it defines a fence signal operation. */ @NativeType("VkResult") public static int vkQueueSubmit(VkQueue queue, @Nullable @NativeType("VkSubmitInfo const *") VkSubmitInfo.Buffer pSubmits, @NativeType("VkFence") long fence) { return nvkQueueSubmit(queue, remainingSafe(pSubmits), memAddressSafe(pSubmits), fence); } /** * Submits a sequence of semaphores or command buffers to a queue. * *
C Specification
* *

To submit command buffers to a queue, call:

* *

     * VkResult vkQueueSubmit(
     *     VkQueue                                     queue,
     *     uint32_t                                    submitCount,
     *     const VkSubmitInfo*                         pSubmits,
     *     VkFence                                     fence);
* *
Description
* *

{@code vkQueueSubmit} is a queue submission command, with each batch defined by an element of {@code pSubmits}. Batches begin execution in the order they appear in {@code pSubmits}, but may complete out of order.

* *

Fence and semaphore operations submitted with {@link #vkQueueSubmit QueueSubmit} have additional ordering constraints compared to other submission commands, with dependencies involving previous and subsequent queue operations. Information about these additional constraints can be found in the semaphore and fence sections of the synchronization chapter.

* *

Details on the interaction of {@code pWaitDstStageMask} with synchronization are described in the semaphore wait operation section of the synchronization chapter.

* *

The order that batches appear in {@code pSubmits} is used to determine submission order, and thus all the implicit ordering guarantees that respect it. Other than these implicit ordering guarantees and any explicit synchronization primitives, these batches may overlap or otherwise execute out of order.

* *

If any command buffer submitted to this queue is in the executable state, it is moved to the pending state. Once execution of all submissions of a command buffer complete, it moves from the pending state, back to the executable state. If a command buffer was recorded with the {@link #VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT} flag, it instead moves to the invalid state.

* *

If {@code vkQueueSubmit} fails, it may return {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY} or {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}. If it does, the implementation must ensure that the state and contents of any resources or synchronization primitives referenced by the submitted command buffers and any semaphores referenced by {@code pSubmits} is unaffected by the call or its failure. If {@code vkQueueSubmit} fails in such a way that the implementation is unable to make that guarantee, the implementation must return {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}. See Lost Device.

* *
Valid Usage
* *
    *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be unsignaled
  • *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must not be associated with any other queue command that has not yet completed execution on that queue
  • *
  • Any calls to {@link #vkCmdSetEvent CmdSetEvent}, {@link #vkCmdResetEvent CmdResetEvent} or {@link #vkCmdWaitEvents CmdWaitEvents} that have been recorded into any of the command buffer elements of the {@code pCommandBuffers} member of any element of {@code pSubmits}, must not reference any {@code VkEvent} that is referenced by any of those commands in a command buffer that has been submitted to another queue and is still in the pending state
  • *
  • Any stage flag included in any element of the {@code pWaitDstStageMask} member of any element of {@code pSubmits} must be a pipeline stage supported by one of the capabilities of {@code queue}, as specified in the table of supported pipeline stages
  • *
  • Each binary semaphore element of the {@code pSignalSemaphores} member of any element of {@code pSubmits} must be unsignaled when the semaphore signal operation it defines is executed on the device
  • *
  • When a semaphore wait operation referring to a binary semaphore defined by any element of the {@code pWaitSemaphores} member of any element of {@code pSubmits} executes on {@code queue}, there must be no other queues waiting on the same semaphore
  • *
  • All elements of the {@code pWaitSemaphores} member of all elements of {@code pSubmits} created with a {@code VkSemaphoreType} of {@link VK12#VK_SEMAPHORE_TYPE_BINARY SEMAPHORE_TYPE_BINARY} must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution
  • *
  • Each element of the {@code pCommandBuffers} member of each element of {@code pSubmits} must be in the pending or executable state
  • *
  • If any element of the {@code pCommandBuffers} member of any element of {@code pSubmits} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT}, it must not be in the pending state
  • *
  • Any secondary command buffers recorded into any element of the {@code pCommandBuffers} member of any element of {@code pSubmits} must be in the pending or executable state
  • *
  • If any secondary command buffers recorded into any element of the {@code pCommandBuffers} member of any element of {@code pSubmits} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT}, it must not be in the pending state
  • *
  • Each element of the {@code pCommandBuffers} member of each element of {@code pSubmits} must have been allocated from a {@code VkCommandPool} that was created for the same queue family {@code queue} belongs to
  • *
  • If any element of {@code pSubmits→pCommandBuffers} includes a Queue Family Transfer Acquire Operation, there must exist a previously submitted Queue Family Transfer Release Operation on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such acquire operations, and which happens-before the acquire operation
  • *
  • If a command recorded into any element of {@code pCommandBuffers} was a {@link #vkCmdBeginQuery CmdBeginQuery} whose {@code queryPool} was created with a {@code queryType} of {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, the profiling lock must have been held continuously on the {@code VkDevice} that {@code queue} was retrieved from, throughout recording of those command buffers
  • *
  • Any resource created with {@link #VK_SHARING_MODE_EXCLUSIVE SHARING_MODE_EXCLUSIVE} that is read by an operation specified by {@code pSubmits} must not be owned by any queue family other than the one which {@code queue} belongs to, at the time it is executed
  • *
  • Any resource created with {@link #VK_SHARING_MODE_CONCURRENT SHARING_MODE_CONCURRENT} that is accessed by an operation specified by {@code pSubmits} must have included the queue family of {@code queue} at resource creation time
  • *
  • If {@code queue} was not created with {@link VK11#VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT DEVICE_QUEUE_CREATE_PROTECTED_BIT}, there must be no element of {@code pSubmits} that includes an {@link VkProtectedSubmitInfo} structure in its {@code pNext} chain with {@code protectedSubmit} equal to {@link #VK_TRUE TRUE}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code queue} must be a valid {@code VkQueue} handle
  • *
  • If {@code submitCount} is not 0, {@code pSubmits} must be a valid pointer to an array of {@code submitCount} valid {@link VkSubmitInfo} structures
  • *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be a valid {@code VkFence} handle
  • *
  • Both of {@code fence}, and {@code queue} that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code queue} must be externally synchronized
  • *
  • Host access to {@code fence} must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
--Any
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* *
See Also
* *

{@link VkSubmitInfo}

* * @param queue the queue that the command buffers will be submitted to. * @param fence an optional handle to a fence to be signaled once all submitted command buffers have completed execution. If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, it defines a fence signal operation. */ @NativeType("VkResult") public static int vkQueueSubmit(VkQueue queue, @NativeType("VkSubmitInfo const *") VkSubmitInfo pSubmit, @NativeType("VkFence") long fence) { return nvkQueueSubmit(queue, 1, pSubmit.address(), fence); } // --- [ vkQueueWaitIdle ] --- /** * Wait for a queue to become idle. * *
C Specification
* *

To wait on the host for the completion of outstanding queue operations for a given queue, call:

* *

     * VkResult vkQueueWaitIdle(
     *     VkQueue                                     queue);
* *
Description
* *

{@code vkQueueWaitIdle} is equivalent to having submitted a valid fence to every previously executed queue submission command that accepts a fence, then waiting for all of those fences to signal using {@link #vkWaitForFences WaitForFences} with an infinite timeout and {@code waitAll} set to {@link #VK_TRUE TRUE}.

* *
Valid Usage (Implicit)
* *
    *
  • {@code queue} must be a valid {@code VkQueue} handle
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code queue} must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
--Any
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* * @param queue the queue on which to wait. */ @NativeType("VkResult") public static int vkQueueWaitIdle(VkQueue queue) { long __functionAddress = queue.getCapabilities().vkQueueWaitIdle; return callPI(queue.address(), __functionAddress); } // --- [ vkDeviceWaitIdle ] --- /** * Wait for a device to become idle. * *
C Specification
* *

To wait on the host for the completion of outstanding queue operations for all queues on a given logical device, call:

* *

     * VkResult vkDeviceWaitIdle(
     *     VkDevice                                    device);
* *
Description
* *

{@code vkDeviceWaitIdle} is equivalent to calling {@code vkQueueWaitIdle} for all queues owned by {@code device}.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
* *
Host Synchronization
* *
    *
  • Host access to all {@code VkQueue} objects created from {@code device} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* * @param device the logical device to idle. */ @NativeType("VkResult") public static int vkDeviceWaitIdle(VkDevice device) { long __functionAddress = device.getCapabilities().vkDeviceWaitIdle; return callPI(device.address(), __functionAddress); } // --- [ vkAllocateMemory ] --- /** Unsafe version of: {@link #vkAllocateMemory AllocateMemory} */ public static int nvkAllocateMemory(VkDevice device, long pAllocateInfo, long pAllocator, long pMemory) { long __functionAddress = device.getCapabilities().vkAllocateMemory; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pAllocateInfo, pAllocator, pMemory, __functionAddress); } /** * Allocate device memory. * *
C Specification
* *

To allocate memory objects, call:

* *

     * VkResult vkAllocateMemory(
     *     VkDevice                                    device,
     *     const VkMemoryAllocateInfo*                 pAllocateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkDeviceMemory*                             pMemory);
* *
Description
* *

Allocations returned by {@code vkAllocateMemory} are guaranteed to meet any alignment requirement of the implementation. For example, if an implementation requires 128 byte alignment for images and 64 byte alignment for buffers, the device memory returned through this mechanism would be 128-byte aligned. This ensures that applications can correctly suballocate objects of different types (with potentially different alignment requirements) in the same memory object.

* *

When memory is allocated, its contents are undefined with the following constraint:

* *
    *
  • The contents of unprotected memory must not be a function of the contents of data protected memory objects, even if those memory objects were previously freed.
  • *
* *
Note
* *

The contents of memory allocated by one application should not be a function of data from protected memory objects of another application, even if those memory objects were previously freed.

*
* *

The maximum number of valid memory allocations that can exist simultaneously within a {@code VkDevice} may be restricted by implementation- or platform-dependent limits. The {@code maxMemoryAllocationCount} feature describes the number of allocations that can exist simultaneously before encountering these internal limits.

* *
Note
* *

For historical reasons, if {@code maxMemoryAllocationCount} is exceeded, some implementations may return {@link #VK_ERROR_TOO_MANY_OBJECTS ERROR_TOO_MANY_OBJECTS}. Exceeding this limit will result in undefined behavior, and an application should not rely on the use of the returned error code in order to identify when the limit is reached.

*
* *
Note
* *

Many protected memory implementations involve complex hardware and system software support, and often have additional and much lower limits on the number of simultaneous protected memory allocations (from memory types with the {@link VK11#VK_MEMORY_PROPERTY_PROTECTED_BIT MEMORY_PROPERTY_PROTECTED_BIT} property) than for non-protected memory allocations. These limits can be system-wide, and depend on a variety of factors outside of the Vulkan implementation, so can’t be queried in Vulkan. Applications should use as few allocations as possible from such memory types by suballocating aggressively, and be prepared for allocation failure even when there is apparently plenty of capacity remaining in the memory heap. As a guideline, the Vulkan conformance test suite requires that at least 80 minimum-size allocations can exist concurrently when no other uses of protected memory are active in the system.

*
* *

Some platforms may have a limit on the maximum size of a single allocation. For example, certain systems may fail to create allocations with a size greater than or equal to 4GB. Such a limit is implementation-dependent, and if such a failure occurs then the error {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY} must be returned. This limit is advertised in {@link VkPhysicalDeviceMaintenance3Properties}{@code ::maxMemoryAllocationSize}.

* *

The cumulative memory size allocated to a heap can be limited by the size of the specified heap. In such cases, allocated memory is tracked on a per-device and per-heap basis. Some platforms allow overallocation into other heaps. The overallocation behavior can be specified through the {@link AMDMemoryOverallocationBehavior VK_AMD_memory_overallocation_behavior} extension.

* *

If the {@link VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT}{@code ::pageableDeviceLocalMemory} feature is enabled, memory allocations made from a heap that includes {@link #VK_MEMORY_HEAP_DEVICE_LOCAL_BIT MEMORY_HEAP_DEVICE_LOCAL_BIT} in {@link VkMemoryHeap}{@code ::flags} may be transparently moved to host-local memory allowing multiple applications to share device-local memory. If there is no space left in device-local memory when this new allocation is made, other allocations may be moved out transparently to make room. The operating system will determine which allocations to move to device-local memory or host-local memory based on platform-specific criteria. To help the operating system make good choices, the application should set the appropriate memory priority with {@link VkMemoryPriorityAllocateInfoEXT} and adjust it as necessary with {@link EXTPageableDeviceLocalMemory#vkSetDeviceMemoryPriorityEXT SetDeviceMemoryPriorityEXT}. Higher priority allocations will moved to device-local memory first.

* *

Memory allocations made on heaps without the {@link #VK_MEMORY_HEAP_DEVICE_LOCAL_BIT MEMORY_HEAP_DEVICE_LOCAL_BIT} property will not be transparently promoted to device-local memory by the operating system.

* *
Valid Usage
* *
    *
  • {@code pAllocateInfo→allocationSize} must be less than or equal to {@link VkPhysicalDeviceMemoryProperties}{@code ::memoryHeaps}[{@code memindex}].{@code size} where {@code memindex} = {@link VkPhysicalDeviceMemoryProperties}{@code ::memoryTypes}[{@code pAllocateInfo→memoryTypeIndex}].{@code heapIndex} as returned by {@link #vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties} for the {@code VkPhysicalDevice} that {@code device} was created from
  • *
  • {@code pAllocateInfo→memoryTypeIndex} must be less than {@link VkPhysicalDeviceMemoryProperties}{@code ::memoryTypeCount} as returned by {@link #vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties} for the {@code VkPhysicalDevice} that {@code device} was created from
  • *
  • If the {@code deviceCoherentMemory} feature is not enabled, {@code pAllocateInfo→memoryTypeIndex} must not identify a memory type supporting {@link AMDDeviceCoherentMemory#VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD}
  • *
  • There must be less than {@link VkPhysicalDeviceLimits}{@code ::maxMemoryAllocationCount} device memory allocations currently allocated on the device
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pAllocateInfo} must be a valid pointer to a valid {@link VkMemoryAllocateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pMemory} must be a valid pointer to a {@code VkDeviceMemory} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link VK11#VK_ERROR_INVALID_EXTERNAL_HANDLE ERROR_INVALID_EXTERNAL_HANDLE}
  • *
  • {@link KHRBufferDeviceAddress#VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkMemoryAllocateInfo}

* * @param device the logical device that owns the memory. * @param pAllocateInfo a pointer to a {@link VkMemoryAllocateInfo} structure describing parameters of the allocation. A successfully returned allocation must use the requested parameters — no substitution is permitted by the implementation. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pMemory a pointer to a {@code VkDeviceMemory} handle in which information about the allocated memory is returned. */ @NativeType("VkResult") public static int vkAllocateMemory(VkDevice device, @NativeType("VkMemoryAllocateInfo const *") VkMemoryAllocateInfo pAllocateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkDeviceMemory *") LongBuffer pMemory) { if (CHECKS) { check(pMemory, 1); } return nvkAllocateMemory(device, pAllocateInfo.address(), memAddressSafe(pAllocator), memAddress(pMemory)); } // --- [ vkFreeMemory ] --- /** Unsafe version of: {@link #vkFreeMemory FreeMemory} */ public static void nvkFreeMemory(VkDevice device, long memory, long pAllocator) { long __functionAddress = device.getCapabilities().vkFreeMemory; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), memory, pAllocator, __functionAddress); } /** * Free device memory. * *
C Specification
* *

To free a memory object, call:

* *

     * void vkFreeMemory(
     *     VkDevice                                    device,
     *     VkDeviceMemory                              memory,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Description
* *

Before freeing a memory object, an application must ensure the memory object is no longer in use by the device — for example by command buffers in the pending state. Memory can be freed whilst still bound to resources, but those resources must not be used afterwards. Freeing a memory object releases the reference it held, if any, to its payload. If there are still any bound images or buffers, the memory object’s payload may not be immediately released by the implementation, but must be released by the time all bound images and buffers have been destroyed. Once all references to a payload are released, it is returned to the heap from which it was allocated.

* *

How memory objects are bound to Images and Buffers is described in detail in the Resource Memory Association section.

* *

If a memory object is mapped at the time it is freed, it is implicitly unmapped.

* *
Note
* *

As described below, host writes are not implicitly flushed when the memory object is unmapped, but the implementation must guarantee that writes that have not been flushed do not affect any other memory.

*
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code memory} (via images or buffers) must have completed execution
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code memory} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code memory} must be a valid {@code VkDeviceMemory} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code memory} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code memory} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that owns the memory. * @param memory the {@code VkDeviceMemory} object to be freed. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkFreeMemory(VkDevice device, @NativeType("VkDeviceMemory") long memory, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkFreeMemory(device, memory, memAddressSafe(pAllocator)); } // --- [ vkMapMemory ] --- /** Unsafe version of: {@link #vkMapMemory MapMemory} */ public static int nvkMapMemory(VkDevice device, long memory, long offset, long size, int flags, long ppData) { long __functionAddress = device.getCapabilities().vkMapMemory; return callPJJJPI(device.address(), memory, offset, size, flags, ppData, __functionAddress); } /** * Map a memory object into application address space. * *
C Specification
* *

To retrieve a host virtual address pointer to a region of a mappable memory object, call:

* *

     * VkResult vkMapMemory(
     *     VkDevice                                    device,
     *     VkDeviceMemory                              memory,
     *     VkDeviceSize                                offset,
     *     VkDeviceSize                                size,
     *     VkMemoryMapFlags                            flags,
     *     void**                                      ppData);
* *
Description
* *

After a successful call to {@code vkMapMemory} the memory object {@code memory} is considered to be currently host mapped.

* *
Note
* *

It is an application error to call {@code vkMapMemory} on a memory object that is already host mapped.

*
* *
Note
* *

{@code vkMapMemory} will fail if the implementation is unable to allocate an appropriately sized contiguous virtual address range, e.g. due to virtual address space fragmentation or platform limits. In such cases, {@code vkMapMemory} must return {@link #VK_ERROR_MEMORY_MAP_FAILED ERROR_MEMORY_MAP_FAILED}. The application can improve the likelihood of success by reducing the size of the mapped range and/or removing unneeded mappings using {@link #vkUnmapMemory UnmapMemory}.

*
* *

{@code vkMapMemory} does not check whether the device memory is currently in use before returning the host-accessible pointer. The application must guarantee that any previously submitted command that writes to this range has completed before the host reads from or writes to that range, and that any previously submitted command that reads from that range has completed before the host writes to that region (see here for details on fulfilling such a guarantee). If the device memory was allocated without the {@link #VK_MEMORY_PROPERTY_HOST_COHERENT_BIT MEMORY_PROPERTY_HOST_COHERENT_BIT} set, these guarantees must be made for an extended range: the application must round down the start of the range to the nearest multiple of {@link VkPhysicalDeviceLimits}{@code ::nonCoherentAtomSize}, and round the end of the range up to the nearest multiple of {@link VkPhysicalDeviceLimits}{@code ::nonCoherentAtomSize}.

* *

While a range of device memory is host mapped, the application is responsible for synchronizing both device and host access to that memory range.

* *
Note
* *

It is important for the application developer to become meticulously familiar with all of the mechanisms described in the chapter on Synchronization and Cache Control as they are crucial to maintaining memory access ordering.

*
* *
Valid Usage
* *
    *
  • {@code memory} must not be currently host mapped
  • *
  • {@code offset} must be less than the size of {@code memory}
  • *
  • If {@code size} is not equal to {@link #VK_WHOLE_SIZE WHOLE_SIZE}, {@code size} must be greater than 0
  • *
  • If {@code size} is not equal to {@link #VK_WHOLE_SIZE WHOLE_SIZE}, {@code size} must be less than or equal to the size of the {@code memory} minus {@code offset}
  • *
  • {@code memory} must have been created with a memory type that reports {@link #VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT MEMORY_PROPERTY_HOST_VISIBLE_BIT}
  • *
  • {@code memory} must not have been allocated with multiple instances
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code memory} must be a valid {@code VkDeviceMemory} handle
  • *
  • {@code flags} must be 0
  • *
  • {@code ppData} must be a valid pointer to a pointer value
  • *
  • {@code memory} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code memory} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_MEMORY_MAP_FAILED ERROR_MEMORY_MAP_FAILED}
  • *
*
* * @param device the logical device that owns the memory. * @param memory the {@code VkDeviceMemory} object to be mapped. * @param offset a zero-based byte offset from the beginning of the memory object. * @param size the size of the memory range to map, or {@link #VK_WHOLE_SIZE WHOLE_SIZE} to map from {@code offset} to the end of the allocation. * @param flags reserved for future use. * @param ppData a pointer to a {@code void *} variable in which is returned a host-accessible pointer to the beginning of the mapped range. This pointer minus {@code offset} must be aligned to at least {@link VkPhysicalDeviceLimits}{@code ::minMemoryMapAlignment}. */ @NativeType("VkResult") public static int vkMapMemory(VkDevice device, @NativeType("VkDeviceMemory") long memory, @NativeType("VkDeviceSize") long offset, @NativeType("VkDeviceSize") long size, @NativeType("VkMemoryMapFlags") int flags, @NativeType("void **") PointerBuffer ppData) { if (CHECKS) { check(ppData, 1); } return nvkMapMemory(device, memory, offset, size, flags, memAddress(ppData)); } // --- [ vkUnmapMemory ] --- /** * Unmap a previously mapped memory object. * *
C Specification
* *

To unmap a memory object once host access to it is no longer needed by the application, call:

* *

     * void vkUnmapMemory(
     *     VkDevice                                    device,
     *     VkDeviceMemory                              memory);
* *
Valid Usage
* *
    *
  • {@code memory} must be currently host mapped
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code memory} must be a valid {@code VkDeviceMemory} handle
  • *
  • {@code memory} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code memory} must be externally synchronized
  • *
* * @param device the logical device that owns the memory. * @param memory the memory object to be unmapped. */ public static void vkUnmapMemory(VkDevice device, @NativeType("VkDeviceMemory") long memory) { long __functionAddress = device.getCapabilities().vkUnmapMemory; callPJV(device.address(), memory, __functionAddress); } // --- [ vkFlushMappedMemoryRanges ] --- /** * Unsafe version of: {@link #vkFlushMappedMemoryRanges FlushMappedMemoryRanges} * * @param memoryRangeCount the length of the {@code pMemoryRanges} array. */ public static int nvkFlushMappedMemoryRanges(VkDevice device, int memoryRangeCount, long pMemoryRanges) { long __functionAddress = device.getCapabilities().vkFlushMappedMemoryRanges; return callPPI(device.address(), memoryRangeCount, pMemoryRanges, __functionAddress); } /** * Flush mapped memory ranges. * *
C Specification
* *

To flush ranges of non-coherent memory from the host caches, call:

* *

     * VkResult vkFlushMappedMemoryRanges(
     *     VkDevice                                    device,
     *     uint32_t                                    memoryRangeCount,
     *     const VkMappedMemoryRange*                  pMemoryRanges);
* *
Description
* *

{@code vkFlushMappedMemoryRanges} guarantees that host writes to the memory ranges described by {@code pMemoryRanges} are made available to the host memory domain, such that they can be made available to the device memory domain via memory domain operations using the {@link #VK_ACCESS_HOST_WRITE_BIT ACCESS_HOST_WRITE_BIT} access type.

* *

Within each range described by {@code pMemoryRanges}, each set of {@code nonCoherentAtomSize} bytes in that range is flushed if any byte in that set has been written by the host since it was first host mapped, or the last time it was flushed. If {@code pMemoryRanges} includes sets of {@code nonCoherentAtomSize} bytes where no bytes have been written by the host, those bytes must not be flushed.

* *

Unmapping non-coherent memory does not implicitly flush the host mapped memory, and host writes that have not been flushed may not ever be visible to the device. However, implementations must ensure that writes that have not been flushed do not become visible to any other memory.

* *
Note
* *

The above guarantee avoids a potential memory corruption in scenarios where host writes to a mapped memory object have not been flushed before the memory is unmapped (or freed), and the virtual address range is subsequently reused for a different mapping (or memory allocation).

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pMemoryRanges} must be a valid pointer to an array of {@code memoryRangeCount} valid {@link VkMappedMemoryRange} structures
  • *
  • {@code memoryRangeCount} must be greater than 0
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkMappedMemoryRange}

* * @param device the logical device that owns the memory ranges. * @param pMemoryRanges a pointer to an array of {@link VkMappedMemoryRange} structures describing the memory ranges to flush. */ @NativeType("VkResult") public static int vkFlushMappedMemoryRanges(VkDevice device, @NativeType("VkMappedMemoryRange const *") VkMappedMemoryRange.Buffer pMemoryRanges) { return nvkFlushMappedMemoryRanges(device, pMemoryRanges.remaining(), pMemoryRanges.address()); } /** * Flush mapped memory ranges. * *
C Specification
* *

To flush ranges of non-coherent memory from the host caches, call:

* *

     * VkResult vkFlushMappedMemoryRanges(
     *     VkDevice                                    device,
     *     uint32_t                                    memoryRangeCount,
     *     const VkMappedMemoryRange*                  pMemoryRanges);
* *
Description
* *

{@code vkFlushMappedMemoryRanges} guarantees that host writes to the memory ranges described by {@code pMemoryRanges} are made available to the host memory domain, such that they can be made available to the device memory domain via memory domain operations using the {@link #VK_ACCESS_HOST_WRITE_BIT ACCESS_HOST_WRITE_BIT} access type.

* *

Within each range described by {@code pMemoryRanges}, each set of {@code nonCoherentAtomSize} bytes in that range is flushed if any byte in that set has been written by the host since it was first host mapped, or the last time it was flushed. If {@code pMemoryRanges} includes sets of {@code nonCoherentAtomSize} bytes where no bytes have been written by the host, those bytes must not be flushed.

* *

Unmapping non-coherent memory does not implicitly flush the host mapped memory, and host writes that have not been flushed may not ever be visible to the device. However, implementations must ensure that writes that have not been flushed do not become visible to any other memory.

* *
Note
* *

The above guarantee avoids a potential memory corruption in scenarios where host writes to a mapped memory object have not been flushed before the memory is unmapped (or freed), and the virtual address range is subsequently reused for a different mapping (or memory allocation).

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pMemoryRanges} must be a valid pointer to an array of {@code memoryRangeCount} valid {@link VkMappedMemoryRange} structures
  • *
  • {@code memoryRangeCount} must be greater than 0
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkMappedMemoryRange}

* * @param device the logical device that owns the memory ranges. */ @NativeType("VkResult") public static int vkFlushMappedMemoryRanges(VkDevice device, @NativeType("VkMappedMemoryRange const *") VkMappedMemoryRange pMemoryRange) { return nvkFlushMappedMemoryRanges(device, 1, pMemoryRange.address()); } // --- [ vkInvalidateMappedMemoryRanges ] --- /** * Unsafe version of: {@link #vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges} * * @param memoryRangeCount the length of the {@code pMemoryRanges} array. */ public static int nvkInvalidateMappedMemoryRanges(VkDevice device, int memoryRangeCount, long pMemoryRanges) { long __functionAddress = device.getCapabilities().vkInvalidateMappedMemoryRanges; return callPPI(device.address(), memoryRangeCount, pMemoryRanges, __functionAddress); } /** * Invalidate ranges of mapped memory objects. * *
C Specification
* *

To invalidate ranges of non-coherent memory from the host caches, call:

* *

     * VkResult vkInvalidateMappedMemoryRanges(
     *     VkDevice                                    device,
     *     uint32_t                                    memoryRangeCount,
     *     const VkMappedMemoryRange*                  pMemoryRanges);
* *
Description
* *

{@code vkInvalidateMappedMemoryRanges} guarantees that device writes to the memory ranges described by {@code pMemoryRanges}, which have been made available to the host memory domain using the {@link #VK_ACCESS_HOST_WRITE_BIT ACCESS_HOST_WRITE_BIT} and {@link #VK_ACCESS_HOST_READ_BIT ACCESS_HOST_READ_BIT} access types, are made visible to the host. If a range of non-coherent memory is written by the host and then invalidated without first being flushed, its contents are undefined.

* *

Within each range described by {@code pMemoryRanges}, each set of {@code nonCoherentAtomSize} bytes in that range is invalidated if any byte in that set has been written by the device since it was first host mapped, or the last time it was invalidated.

* *
Note
* *

Mapping non-coherent memory does not implicitly invalidate that memory.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pMemoryRanges} must be a valid pointer to an array of {@code memoryRangeCount} valid {@link VkMappedMemoryRange} structures
  • *
  • {@code memoryRangeCount} must be greater than 0
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkMappedMemoryRange}

* * @param device the logical device that owns the memory ranges. * @param pMemoryRanges a pointer to an array of {@link VkMappedMemoryRange} structures describing the memory ranges to invalidate. */ @NativeType("VkResult") public static int vkInvalidateMappedMemoryRanges(VkDevice device, @NativeType("VkMappedMemoryRange const *") VkMappedMemoryRange.Buffer pMemoryRanges) { return nvkInvalidateMappedMemoryRanges(device, pMemoryRanges.remaining(), pMemoryRanges.address()); } /** * Invalidate ranges of mapped memory objects. * *
C Specification
* *

To invalidate ranges of non-coherent memory from the host caches, call:

* *

     * VkResult vkInvalidateMappedMemoryRanges(
     *     VkDevice                                    device,
     *     uint32_t                                    memoryRangeCount,
     *     const VkMappedMemoryRange*                  pMemoryRanges);
* *
Description
* *

{@code vkInvalidateMappedMemoryRanges} guarantees that device writes to the memory ranges described by {@code pMemoryRanges}, which have been made available to the host memory domain using the {@link #VK_ACCESS_HOST_WRITE_BIT ACCESS_HOST_WRITE_BIT} and {@link #VK_ACCESS_HOST_READ_BIT ACCESS_HOST_READ_BIT} access types, are made visible to the host. If a range of non-coherent memory is written by the host and then invalidated without first being flushed, its contents are undefined.

* *

Within each range described by {@code pMemoryRanges}, each set of {@code nonCoherentAtomSize} bytes in that range is invalidated if any byte in that set has been written by the device since it was first host mapped, or the last time it was invalidated.

* *
Note
* *

Mapping non-coherent memory does not implicitly invalidate that memory.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pMemoryRanges} must be a valid pointer to an array of {@code memoryRangeCount} valid {@link VkMappedMemoryRange} structures
  • *
  • {@code memoryRangeCount} must be greater than 0
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkMappedMemoryRange}

* * @param device the logical device that owns the memory ranges. */ @NativeType("VkResult") public static int vkInvalidateMappedMemoryRanges(VkDevice device, @NativeType("VkMappedMemoryRange const *") VkMappedMemoryRange pMemoryRange) { return nvkInvalidateMappedMemoryRanges(device, 1, pMemoryRange.address()); } // --- [ vkGetDeviceMemoryCommitment ] --- /** Unsafe version of: {@link #vkGetDeviceMemoryCommitment GetDeviceMemoryCommitment} */ public static void nvkGetDeviceMemoryCommitment(VkDevice device, long memory, long pCommittedMemoryInBytes) { long __functionAddress = device.getCapabilities().vkGetDeviceMemoryCommitment; callPJPV(device.address(), memory, pCommittedMemoryInBytes, __functionAddress); } /** * Query the current commitment for a VkDeviceMemory. * *
C Specification
* *

To determine the amount of lazily-allocated memory that is currently committed for a memory object, call:

* *

     * void vkGetDeviceMemoryCommitment(
     *     VkDevice                                    device,
     *     VkDeviceMemory                              memory,
     *     VkDeviceSize*                               pCommittedMemoryInBytes);
* *
Description
* *

The implementation may update the commitment at any time, and the value returned by this query may be out of date.

* *

The implementation guarantees to allocate any committed memory from the {@code heapIndex} indicated by the memory type that the memory object was created with.

* *
Valid Usage
* *
    *
  • {@code memory} must have been created with a memory type that reports {@link #VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code memory} must be a valid {@code VkDeviceMemory} handle
  • *
  • {@code pCommittedMemoryInBytes} must be a valid pointer to a {@code VkDeviceSize} value
  • *
  • {@code memory} must have been created, allocated, or retrieved from {@code device}
  • *
* * @param device the logical device that owns the memory. * @param memory the memory object being queried. * @param pCommittedMemoryInBytes a pointer to a {@code VkDeviceSize} value in which the number of bytes currently committed is returned, on success. */ public static void vkGetDeviceMemoryCommitment(VkDevice device, @NativeType("VkDeviceMemory") long memory, @NativeType("VkDeviceSize *") LongBuffer pCommittedMemoryInBytes) { if (CHECKS) { check(pCommittedMemoryInBytes, 1); } nvkGetDeviceMemoryCommitment(device, memory, memAddress(pCommittedMemoryInBytes)); } // --- [ vkBindBufferMemory ] --- /** * Bind device memory to a buffer object. * *
C Specification
* *

To attach memory to a buffer object, call:

* *

     * VkResult vkBindBufferMemory(
     *     VkDevice                                    device,
     *     VkBuffer                                    buffer,
     *     VkDeviceMemory                              memory,
     *     VkDeviceSize                                memoryOffset);
* *
Description
* *

{@code vkBindBufferMemory} is equivalent to passing the same parameters through {@link VkBindBufferMemoryInfo} to {@link VK11#vkBindBufferMemory2 BindBufferMemory2}.

* *
Valid Usage
* *
    *
  • {@code buffer} must not already be backed by a memory object
  • *
  • {@code buffer} must not have been created with any sparse memory binding flags
  • *
  • {@code memoryOffset} must be less than the size of {@code memory}
  • *
  • {@code memory} must have been allocated using one of the memory types allowed in the {@code memoryTypeBits} member of the {@link VkMemoryRequirements} structure returned from a call to {@code vkGetBufferMemoryRequirements} with {@code buffer}
  • *
  • {@code memoryOffset} must be an integer multiple of the {@code alignment} member of the {@link VkMemoryRequirements} structure returned from a call to {@code vkGetBufferMemoryRequirements} with {@code buffer}
  • *
  • The {@code size} member of the {@link VkMemoryRequirements} structure returned from a call to {@code vkGetBufferMemoryRequirements} with {@code buffer} must be less than or equal to the size of {@code memory} minus {@code memoryOffset}
  • *
  • If {@code buffer} requires a dedicated allocation (as reported by {@link VK11#vkGetBufferMemoryRequirements2 GetBufferMemoryRequirements2} in {@link VkMemoryDedicatedRequirements}{@code ::requiresDedicatedAllocation} for {@code buffer}), {@code memory} must have been allocated with {@link VkMemoryDedicatedAllocateInfo}{@code ::buffer} equal to {@code buffer}
  • *
  • If the {@link VkMemoryAllocateInfo} provided when {@code memory} was allocated included a {@link VkMemoryDedicatedAllocateInfo} structure in its {@code pNext} chain, and {@link VkMemoryDedicatedAllocateInfo}{@code ::buffer} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, then {@code buffer} must equal {@link VkMemoryDedicatedAllocateInfo}{@code ::buffer}, and {@code memoryOffset} must be zero
  • *
  • If {@code buffer} was created with the {@link VK11#VK_BUFFER_CREATE_PROTECTED_BIT BUFFER_CREATE_PROTECTED_BIT} bit set, the buffer must be bound to a memory object allocated with a memory type that reports {@link VK11#VK_MEMORY_PROPERTY_PROTECTED_BIT MEMORY_PROPERTY_PROTECTED_BIT}
  • *
  • If {@code buffer} was created with the {@link VK11#VK_BUFFER_CREATE_PROTECTED_BIT BUFFER_CREATE_PROTECTED_BIT} bit not set, the buffer must not be bound to a memory object allocated with a memory type that reports {@link VK11#VK_MEMORY_PROPERTY_PROTECTED_BIT MEMORY_PROPERTY_PROTECTED_BIT}
  • *
  • If {@code buffer} was created with {@link VkDedicatedAllocationBufferCreateInfoNV}{@code ::dedicatedAllocation} equal to {@link #VK_TRUE TRUE}, {@code memory} must have been allocated with {@link VkDedicatedAllocationMemoryAllocateInfoNV}{@code ::buffer} equal to a buffer handle created with identical creation parameters to {@code buffer} and {@code memoryOffset} must be zero
  • *
  • If the value of {@link VkExportMemoryAllocateInfo}{@code ::handleTypes} used to allocate {@code memory} is not 0, it must include at least one of the handles set in {@link VkExternalMemoryBufferCreateInfo}{@code ::handleTypes} when {@code buffer} was created
  • *
  • If {@code memory} was allocated by a memory import operation, the external handle type of the imported memory must also have been set in {@link VkExternalMemoryBufferCreateInfo}{@code ::handleTypes} when {@code buffer} was created
  • *
  • If the {@link VkPhysicalDeviceBufferDeviceAddressFeatures}{@code ::bufferDeviceAddress} feature is enabled and {@code buffer} was created with the {@link VK12#VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT} bit set, {@code memory} must have been allocated with the {@link VK12#VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT} bit set
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code buffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code memory} must be a valid {@code VkDeviceMemory} handle
  • *
  • {@code buffer} must have been created, allocated, or retrieved from {@code device}
  • *
  • {@code memory} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code buffer} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link KHRBufferDeviceAddress#VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR}
  • *
*
* * @param device the logical device that owns the buffer and memory. * @param buffer the buffer to be attached to memory. * @param memory a {@code VkDeviceMemory} object describing the device memory to attach. * @param memoryOffset the start offset of the region of {@code memory} which is to be bound to the buffer. The number of bytes returned in the {@link VkMemoryRequirements}{@code ::size} member in {@code memory}, starting from {@code memoryOffset} bytes, will be bound to the specified buffer. */ @NativeType("VkResult") public static int vkBindBufferMemory(VkDevice device, @NativeType("VkBuffer") long buffer, @NativeType("VkDeviceMemory") long memory, @NativeType("VkDeviceSize") long memoryOffset) { long __functionAddress = device.getCapabilities().vkBindBufferMemory; return callPJJJI(device.address(), buffer, memory, memoryOffset, __functionAddress); } // --- [ vkBindImageMemory ] --- /** * Bind device memory to an image object. * *
C Specification
* *

To attach memory to a {@code VkImage} object created without the {@link VK11#VK_IMAGE_CREATE_DISJOINT_BIT IMAGE_CREATE_DISJOINT_BIT} set, call:

* *

     * VkResult vkBindImageMemory(
     *     VkDevice                                    device,
     *     VkImage                                     image,
     *     VkDeviceMemory                              memory,
     *     VkDeviceSize                                memoryOffset);
* *
Description
* *

{@code vkBindImageMemory} is equivalent to passing the same parameters through {@link VkBindImageMemoryInfo} to {@link VK11#vkBindImageMemory2 BindImageMemory2}.

* *
Valid Usage
* *
    *
  • {@code image} must not already be backed by a memory object
  • *
  • {@code image} must not have been created with any sparse memory binding flags
  • *
  • {@code memoryOffset} must be less than the size of {@code memory}
  • *
  • If {@code image} requires a dedicated allocation (as reported by {@link VK11#vkGetImageMemoryRequirements2 GetImageMemoryRequirements2} in {@link VkMemoryDedicatedRequirements}{@code ::requiresDedicatedAllocation} for {@code image}), {@code memory} must have been created with {@link VkMemoryDedicatedAllocateInfo}{@code ::image} equal to {@code image}
  • *
  • If the dedicated allocation image aliasing feature is not enabled, and the {@link VkMemoryAllocateInfo} provided when {@code memory} was allocated included a {@link VkMemoryDedicatedAllocateInfo} structure in its {@code pNext} chain, and {@link VkMemoryDedicatedAllocateInfo}{@code ::image} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, then {@code image} must equal {@link VkMemoryDedicatedAllocateInfo}{@code ::image} and {@code memoryOffset} must be zero
  • *
  • If the dedicated allocation image aliasing feature is enabled, and the {@link VkMemoryAllocateInfo} provided when {@code memory} was allocated included a {@link VkMemoryDedicatedAllocateInfo} structure in its {@code pNext} chain, and {@link VkMemoryDedicatedAllocateInfo}{@code ::image} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, then {@code memoryOffset} must be zero, and {@code image} must be either equal to {@link VkMemoryDedicatedAllocateInfo}{@code ::image} or an image that was created using the same parameters in {@link VkImageCreateInfo}, with the exception that {@code extent} and {@code arrayLayers} may differ subject to the following restrictions: every dimension in the {@code extent} parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created; and the {@code arrayLayers} parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created
  • *
  • If image was created with the {@link VK11#VK_IMAGE_CREATE_PROTECTED_BIT IMAGE_CREATE_PROTECTED_BIT} bit set, the image must be bound to a memory object allocated with a memory type that reports {@link VK11#VK_MEMORY_PROPERTY_PROTECTED_BIT MEMORY_PROPERTY_PROTECTED_BIT}
  • *
  • If image was created with the {@link VK11#VK_IMAGE_CREATE_PROTECTED_BIT IMAGE_CREATE_PROTECTED_BIT} bit not set, the image must not be bound to a memory object created with a memory type that reports {@link VK11#VK_MEMORY_PROPERTY_PROTECTED_BIT MEMORY_PROPERTY_PROTECTED_BIT}
  • *
  • If {@code image} was created with {@link VkDedicatedAllocationImageCreateInfoNV}{@code ::dedicatedAllocation} equal to {@link #VK_TRUE TRUE}, {@code memory} must have been created with {@link VkDedicatedAllocationMemoryAllocateInfoNV}{@code ::image} equal to an image handle created with identical creation parameters to {@code image} and {@code memoryOffset} must be zero
  • *
  • If the value of {@link VkExportMemoryAllocateInfo}{@code ::handleTypes} used to allocate {@code memory} is not 0, it must include at least one of the handles set in {@link VkExternalMemoryImageCreateInfo}{@code ::handleTypes} when {@code image} was created
  • *
  • If {@code memory} was created by a memory import operation, the external handle type of the imported memory must also have been set in {@link VkExternalMemoryImageCreateInfo}{@code ::handleTypes} when {@code image} was created
  • *
  • {@code image} must not have been created with the {@link VK11#VK_IMAGE_CREATE_DISJOINT_BIT IMAGE_CREATE_DISJOINT_BIT} set
  • *
  • {@code memory} must have been allocated using one of the memory types allowed in the {@code memoryTypeBits} member of the {@link VkMemoryRequirements} structure returned from a call to {@link #vkGetImageMemoryRequirements GetImageMemoryRequirements} with {@code image}
  • *
  • {@code memoryOffset} must be an integer multiple of the {@code alignment} member of the {@link VkMemoryRequirements} structure returned from a call to {@link #vkGetImageMemoryRequirements GetImageMemoryRequirements} with {@code image}
  • *
  • The difference of the size of {@code memory} and {@code memoryOffset} must be greater than or equal to the {@code size} member of the {@link VkMemoryRequirements} structure returned from a call to {@link #vkGetImageMemoryRequirements GetImageMemoryRequirements} with the same {@code image}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code image} must be a valid {@code VkImage} handle
  • *
  • {@code memory} must be a valid {@code VkDeviceMemory} handle
  • *
  • {@code image} must have been created, allocated, or retrieved from {@code device}
  • *
  • {@code memory} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code image} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param device the logical device that owns the image and memory. * @param image the image. * @param memory the {@code VkDeviceMemory} object describing the device memory to attach. * @param memoryOffset the start offset of the region of {@code memory} which is to be bound to the image. The number of bytes returned in the {@link VkMemoryRequirements}{@code ::size} member in {@code memory}, starting from {@code memoryOffset} bytes, will be bound to the specified image. */ @NativeType("VkResult") public static int vkBindImageMemory(VkDevice device, @NativeType("VkImage") long image, @NativeType("VkDeviceMemory") long memory, @NativeType("VkDeviceSize") long memoryOffset) { long __functionAddress = device.getCapabilities().vkBindImageMemory; return callPJJJI(device.address(), image, memory, memoryOffset, __functionAddress); } // --- [ vkGetBufferMemoryRequirements ] --- /** Unsafe version of: {@link #vkGetBufferMemoryRequirements GetBufferMemoryRequirements} */ public static void nvkGetBufferMemoryRequirements(VkDevice device, long buffer, long pMemoryRequirements) { long __functionAddress = device.getCapabilities().vkGetBufferMemoryRequirements; callPJPV(device.address(), buffer, pMemoryRequirements, __functionAddress); } /** * Returns the memory requirements for specified Vulkan object. * *
C Specification
* *

To determine the memory requirements for a buffer resource, call:

* *

     * void vkGetBufferMemoryRequirements(
     *     VkDevice                                    device,
     *     VkBuffer                                    buffer,
     *     VkMemoryRequirements*                       pMemoryRequirements);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code buffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code pMemoryRequirements} must be a valid pointer to a {@link VkMemoryRequirements} structure
  • *
  • {@code buffer} must have been created, allocated, or retrieved from {@code device}
  • *
* *
See Also
* *

{@link VkMemoryRequirements}

* * @param device the logical device that owns the buffer. * @param buffer the buffer to query. * @param pMemoryRequirements a pointer to a {@link VkMemoryRequirements} structure in which the memory requirements of the buffer object are returned. */ public static void vkGetBufferMemoryRequirements(VkDevice device, @NativeType("VkBuffer") long buffer, @NativeType("VkMemoryRequirements *") VkMemoryRequirements pMemoryRequirements) { nvkGetBufferMemoryRequirements(device, buffer, pMemoryRequirements.address()); } // --- [ vkGetImageMemoryRequirements ] --- /** Unsafe version of: {@link #vkGetImageMemoryRequirements GetImageMemoryRequirements} */ public static void nvkGetImageMemoryRequirements(VkDevice device, long image, long pMemoryRequirements) { long __functionAddress = device.getCapabilities().vkGetImageMemoryRequirements; callPJPV(device.address(), image, pMemoryRequirements, __functionAddress); } /** * Returns the memory requirements for specified Vulkan object. * *
C Specification
* *

To determine the memory requirements for an image resource which is not created with the {@link VK11#VK_IMAGE_CREATE_DISJOINT_BIT IMAGE_CREATE_DISJOINT_BIT} flag set, call:

* *

     * void vkGetImageMemoryRequirements(
     *     VkDevice                                    device,
     *     VkImage                                     image,
     *     VkMemoryRequirements*                       pMemoryRequirements);
* *
Valid Usage
* *
    *
  • {@code image} must not have been created with the {@link VK11#VK_IMAGE_CREATE_DISJOINT_BIT IMAGE_CREATE_DISJOINT_BIT} flag set
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code image} must be a valid {@code VkImage} handle
  • *
  • {@code pMemoryRequirements} must be a valid pointer to a {@link VkMemoryRequirements} structure
  • *
  • {@code image} must have been created, allocated, or retrieved from {@code device}
  • *
* *
See Also
* *

{@link VkMemoryRequirements}

* * @param device the logical device that owns the image. * @param image the image to query. * @param pMemoryRequirements a pointer to a {@link VkMemoryRequirements} structure in which the memory requirements of the image object are returned. */ public static void vkGetImageMemoryRequirements(VkDevice device, @NativeType("VkImage") long image, @NativeType("VkMemoryRequirements *") VkMemoryRequirements pMemoryRequirements) { nvkGetImageMemoryRequirements(device, image, pMemoryRequirements.address()); } // --- [ vkGetImageSparseMemoryRequirements ] --- /** * Unsafe version of: {@link #vkGetImageSparseMemoryRequirements GetImageSparseMemoryRequirements} * * @param pSparseMemoryRequirementCount a pointer to an integer related to the number of sparse memory requirements available or queried, as described below. */ public static void nvkGetImageSparseMemoryRequirements(VkDevice device, long image, long pSparseMemoryRequirementCount, long pSparseMemoryRequirements) { long __functionAddress = device.getCapabilities().vkGetImageSparseMemoryRequirements; callPJPPV(device.address(), image, pSparseMemoryRequirementCount, pSparseMemoryRequirements, __functionAddress); } /** * Query the memory requirements for a sparse image. * *
C Specification
* *

To query sparse memory requirements for an image, call:

* *

     * void vkGetImageSparseMemoryRequirements(
     *     VkDevice                                    device,
     *     VkImage                                     image,
     *     uint32_t*                                   pSparseMemoryRequirementCount,
     *     VkSparseImageMemoryRequirements*            pSparseMemoryRequirements);
* *
Description
* *

If {@code pSparseMemoryRequirements} is {@code NULL}, then the number of sparse memory requirements available is returned in {@code pSparseMemoryRequirementCount}. Otherwise, {@code pSparseMemoryRequirementCount} must point to a variable set by the user to the number of elements in the {@code pSparseMemoryRequirements} array, and on return the variable is overwritten with the number of structures actually written to {@code pSparseMemoryRequirements}. If {@code pSparseMemoryRequirementCount} is less than the number of sparse memory requirements available, at most {@code pSparseMemoryRequirementCount} structures will be written.

* *

If the image was not created with {@link #VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} then {@code pSparseMemoryRequirementCount} will be set to zero and {@code pSparseMemoryRequirements} will not be written to.

* *
Note
* *

It is legal for an implementation to report a larger value in {@link VkMemoryRequirements}{@code ::size} than would be obtained by adding together memory sizes for all {@link VkSparseImageMemoryRequirements} returned by {@code vkGetImageSparseMemoryRequirements}. This may occur when the implementation requires unused padding in the address range describing the resource.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code image} must be a valid {@code VkImage} handle
  • *
  • {@code pSparseMemoryRequirementCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pSparseMemoryRequirementCount} is not 0, and {@code pSparseMemoryRequirements} is not {@code NULL}, {@code pSparseMemoryRequirements} must be a valid pointer to an array of {@code pSparseMemoryRequirementCount} {@link VkSparseImageMemoryRequirements} structures
  • *
  • {@code image} must have been created, allocated, or retrieved from {@code device}
  • *
* *
See Also
* *

{@link VkSparseImageMemoryRequirements}

* * @param device the logical device that owns the image. * @param image the {@code VkImage} object to get the memory requirements for. * @param pSparseMemoryRequirementCount a pointer to an integer related to the number of sparse memory requirements available or queried, as described below. * @param pSparseMemoryRequirements either {@code NULL} or a pointer to an array of {@link VkSparseImageMemoryRequirements} structures. */ public static void vkGetImageSparseMemoryRequirements(VkDevice device, @NativeType("VkImage") long image, @NativeType("uint32_t *") IntBuffer pSparseMemoryRequirementCount, @Nullable @NativeType("VkSparseImageMemoryRequirements *") VkSparseImageMemoryRequirements.Buffer pSparseMemoryRequirements) { if (CHECKS) { check(pSparseMemoryRequirementCount, 1); checkSafe(pSparseMemoryRequirements, pSparseMemoryRequirementCount.get(pSparseMemoryRequirementCount.position())); } nvkGetImageSparseMemoryRequirements(device, image, memAddress(pSparseMemoryRequirementCount), memAddressSafe(pSparseMemoryRequirements)); } // --- [ vkGetPhysicalDeviceSparseImageFormatProperties ] --- /** * Unsafe version of: {@link #vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties} * * @param pPropertyCount a pointer to an integer related to the number of sparse format properties available or queried, as described below. */ public static void nvkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int samples, int usage, int tiling, long pPropertyCount, long pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSparseImageFormatProperties; callPPPV(physicalDevice.address(), format, type, samples, usage, tiling, pPropertyCount, pProperties, __functionAddress); } /** * Retrieve properties of an image format applied to sparse images. * *
C Specification
* *

{@code vkGetPhysicalDeviceSparseImageFormatProperties} returns an array of {@link VkSparseImageFormatProperties}. Each element will describe properties for one set of image aspects that are bound simultaneously in the image. This is usually one element for each aspect in the image, but for interleaved depth/stencil images there is only one element describing the combined aspects.

* *

     * void vkGetPhysicalDeviceSparseImageFormatProperties(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkFormat                                    format,
     *     VkImageType                                 type,
     *     VkSampleCountFlagBits                       samples,
     *     VkImageUsageFlags                           usage,
     *     VkImageTiling                               tiling,
     *     uint32_t*                                   pPropertyCount,
     *     VkSparseImageFormatProperties*              pProperties);
* *
Description
* *

If {@code pProperties} is {@code NULL}, then the number of sparse format properties available is returned in {@code pPropertyCount}. Otherwise, {@code pPropertyCount} must point to a variable set by the user to the number of elements in the {@code pProperties} array, and on return the variable is overwritten with the number of structures actually written to {@code pProperties}. If {@code pPropertyCount} is less than the number of sparse format properties available, at most {@code pPropertyCount} structures will be written.

* *

If {@link #VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} is not supported for the given arguments, {@code pPropertyCount} will be set to zero upon return, and no data will be written to {@code pProperties}.

* *

Multiple aspects are returned for depth/stencil images that are implemented as separate planes by the implementation. The depth and stencil data planes each have unique {@link VkSparseImageFormatProperties} data.

* *

Depth/stencil images with depth and stencil data interleaved into a single plane will return a single {@link VkSparseImageFormatProperties} structure with the {@code aspectMask} set to {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT} | {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}.

* *
Valid Usage
* *
    *
  • {@code samples} must be a bit value that is set in {@link VkImageFormatProperties}{@code ::sampleCounts} returned by {@code vkGetPhysicalDeviceImageFormatProperties} with {@code format}, {@code type}, {@code tiling}, and {@code usage} equal to those in this command and {@code flags} equal to the value that is set in {@link VkImageCreateInfo}{@code ::flags} when the image is created
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code format} must be a valid {@code VkFormat} value
  • *
  • {@code type} must be a valid {@code VkImageType} value
  • *
  • {@code samples} must be a valid {@code VkSampleCountFlagBits} value
  • *
  • {@code usage} must be a valid combination of {@code VkImageUsageFlagBits} values
  • *
  • {@code usage} must not be 0
  • *
  • {@code tiling} must be a valid {@code VkImageTiling} value
  • *
  • {@code pPropertyCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPropertyCount} is not 0, and {@code pProperties} is not {@code NULL}, {@code pProperties} must be a valid pointer to an array of {@code pPropertyCount} {@link VkSparseImageFormatProperties} structures
  • *
* *
See Also
* *

{@link VkSparseImageFormatProperties}

* * @param physicalDevice the physical device from which to query the sparse image format properties. * @param format the image format. * @param type the dimensionality of image. * @param samples a {@code VkSampleCountFlagBits} value specifying the number of samples per texel. * @param usage a bitmask describing the intended usage of the image. * @param tiling the tiling arrangement of the texel blocks in memory. * @param pPropertyCount a pointer to an integer related to the number of sparse format properties available or queried, as described below. * @param pProperties either {@code NULL} or a pointer to an array of {@link VkSparseImageFormatProperties} structures. */ public static void vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, @NativeType("VkFormat") int format, @NativeType("VkImageType") int type, @NativeType("VkSampleCountFlagBits") int samples, @NativeType("VkImageUsageFlags") int usage, @NativeType("VkImageTiling") int tiling, @NativeType("uint32_t *") IntBuffer pPropertyCount, @Nullable @NativeType("VkSparseImageFormatProperties *") VkSparseImageFormatProperties.Buffer pProperties) { if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount.get(pPropertyCount.position())); } nvkGetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, memAddress(pPropertyCount), memAddressSafe(pProperties)); } // --- [ vkQueueBindSparse ] --- /** * Unsafe version of: {@link #vkQueueBindSparse QueueBindSparse} * * @param bindInfoCount the number of elements in the {@code pBindInfo} array. */ public static int nvkQueueBindSparse(VkQueue queue, int bindInfoCount, long pBindInfo, long fence) { long __functionAddress = queue.getCapabilities().vkQueueBindSparse; if (CHECKS) { if (pBindInfo != NULL) { Struct.validate(pBindInfo, bindInfoCount, VkBindSparseInfo.SIZEOF, VkBindSparseInfo::validate); } } return callPPJI(queue.address(), bindInfoCount, pBindInfo, fence, __functionAddress); } /** * Bind device memory to a sparse resource object. * *
C Specification
* *

To submit sparse binding operations to a queue, call:

* *

     * VkResult vkQueueBindSparse(
     *     VkQueue                                     queue,
     *     uint32_t                                    bindInfoCount,
     *     const VkBindSparseInfo*                     pBindInfo,
     *     VkFence                                     fence);
* *
Description
* *

{@code vkQueueBindSparse} is a queue submission command, with each batch defined by an element of {@code pBindInfo} as a {@link VkBindSparseInfo} structure. Batches begin execution in the order they appear in {@code pBindInfo}, but may complete out of order.

* *

Within a batch, a given range of a resource must not be bound more than once. Across batches, if a range is to be bound to one allocation and offset and then to another allocation and offset, then the application must guarantee (usually using semaphores) that the binding operations are executed in the correct order, as well as to order binding operations against the execution of command buffer submissions.

* *

As no operation to {@link #vkQueueBindSparse QueueBindSparse} causes any pipeline stage to access memory, synchronization primitives used in this command effectively only define execution dependencies.

* *

Additional information about fence and semaphore operation is described in the synchronization chapter.

* *
Valid Usage
* *
    *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be unsignaled
  • *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must not be associated with any other queue command that has not yet completed execution on that queue
  • *
  • Each element of the {@code pSignalSemaphores} member of each element of {@code pBindInfo} must be unsignaled when the semaphore signal operation it defines is executed on the device
  • *
  • When a semaphore wait operation referring to a binary semaphore defined by any element of the {@code pWaitSemaphores} member of any element of {@code pBindInfo} executes on {@code queue}, there must be no other queues waiting on the same semaphore
  • *
  • All elements of the {@code pWaitSemaphores} member of all elements of the {@code pBindInfo} parameter referring to a binary semaphore must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution
  • *
  • All elements of the {@code pWaitSemaphores} member of all elements of {@code pBindInfo} created with a {@code VkSemaphoreType} of {@link VK12#VK_SEMAPHORE_TYPE_BINARY SEMAPHORE_TYPE_BINARY} must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code queue} must be a valid {@code VkQueue} handle
  • *
  • If {@code bindInfoCount} is not 0, {@code pBindInfo} must be a valid pointer to an array of {@code bindInfoCount} valid {@link VkBindSparseInfo} structures
  • *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be a valid {@code VkFence} handle
  • *
  • The {@code queue} must support sparse binding operations
  • *
  • Both of {@code fence}, and {@code queue} that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code queue} must be externally synchronized
  • *
  • Host access to {@code pBindInfo}[].pBufferBinds[].buffer must be externally synchronized
  • *
  • Host access to {@code pBindInfo}[].pImageOpaqueBinds[].image must be externally synchronized
  • *
  • Host access to {@code pBindInfo}[].pImageBinds[].image must be externally synchronized
  • *
  • Host access to {@code fence} must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
--SPARSE_BINDING
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* *
See Also
* *

{@link VkBindSparseInfo}

* * @param queue the queue that the sparse binding operations will be submitted to. * @param pBindInfo a pointer to an array of {@link VkBindSparseInfo} structures, each specifying a sparse binding submission batch. * @param fence an optional handle to a fence to be signaled. If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, it defines a fence signal operation. */ @NativeType("VkResult") public static int vkQueueBindSparse(VkQueue queue, @Nullable @NativeType("VkBindSparseInfo const *") VkBindSparseInfo.Buffer pBindInfo, @NativeType("VkFence") long fence) { return nvkQueueBindSparse(queue, remainingSafe(pBindInfo), memAddressSafe(pBindInfo), fence); } /** * Bind device memory to a sparse resource object. * *
C Specification
* *

To submit sparse binding operations to a queue, call:

* *

     * VkResult vkQueueBindSparse(
     *     VkQueue                                     queue,
     *     uint32_t                                    bindInfoCount,
     *     const VkBindSparseInfo*                     pBindInfo,
     *     VkFence                                     fence);
* *
Description
* *

{@code vkQueueBindSparse} is a queue submission command, with each batch defined by an element of {@code pBindInfo} as a {@link VkBindSparseInfo} structure. Batches begin execution in the order they appear in {@code pBindInfo}, but may complete out of order.

* *

Within a batch, a given range of a resource must not be bound more than once. Across batches, if a range is to be bound to one allocation and offset and then to another allocation and offset, then the application must guarantee (usually using semaphores) that the binding operations are executed in the correct order, as well as to order binding operations against the execution of command buffer submissions.

* *

As no operation to {@link #vkQueueBindSparse QueueBindSparse} causes any pipeline stage to access memory, synchronization primitives used in this command effectively only define execution dependencies.

* *

Additional information about fence and semaphore operation is described in the synchronization chapter.

* *
Valid Usage
* *
    *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be unsignaled
  • *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must not be associated with any other queue command that has not yet completed execution on that queue
  • *
  • Each element of the {@code pSignalSemaphores} member of each element of {@code pBindInfo} must be unsignaled when the semaphore signal operation it defines is executed on the device
  • *
  • When a semaphore wait operation referring to a binary semaphore defined by any element of the {@code pWaitSemaphores} member of any element of {@code pBindInfo} executes on {@code queue}, there must be no other queues waiting on the same semaphore
  • *
  • All elements of the {@code pWaitSemaphores} member of all elements of the {@code pBindInfo} parameter referring to a binary semaphore must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution
  • *
  • All elements of the {@code pWaitSemaphores} member of all elements of {@code pBindInfo} created with a {@code VkSemaphoreType} of {@link VK12#VK_SEMAPHORE_TYPE_BINARY SEMAPHORE_TYPE_BINARY} must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code queue} must be a valid {@code VkQueue} handle
  • *
  • If {@code bindInfoCount} is not 0, {@code pBindInfo} must be a valid pointer to an array of {@code bindInfoCount} valid {@link VkBindSparseInfo} structures
  • *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be a valid {@code VkFence} handle
  • *
  • The {@code queue} must support sparse binding operations
  • *
  • Both of {@code fence}, and {@code queue} that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code queue} must be externally synchronized
  • *
  • Host access to {@code pBindInfo}[].pBufferBinds[].buffer must be externally synchronized
  • *
  • Host access to {@code pBindInfo}[].pImageOpaqueBinds[].image must be externally synchronized
  • *
  • Host access to {@code pBindInfo}[].pImageBinds[].image must be externally synchronized
  • *
  • Host access to {@code fence} must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
--SPARSE_BINDING
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* *
See Also
* *

{@link VkBindSparseInfo}

* * @param queue the queue that the sparse binding operations will be submitted to. * @param pBindInfo a pointer to an array of {@link VkBindSparseInfo} structures, each specifying a sparse binding submission batch. * @param fence an optional handle to a fence to be signaled. If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, it defines a fence signal operation. */ @NativeType("VkResult") public static int vkQueueBindSparse(VkQueue queue, @NativeType("VkBindSparseInfo const *") VkBindSparseInfo pBindInfo, @NativeType("VkFence") long fence) { return nvkQueueBindSparse(queue, 1, pBindInfo.address(), fence); } // --- [ vkCreateFence ] --- /** Unsafe version of: {@link #vkCreateFence CreateFence} */ public static int nvkCreateFence(VkDevice device, long pCreateInfo, long pAllocator, long pFence) { long __functionAddress = device.getCapabilities().vkCreateFence; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pFence, __functionAddress); } /** * Create a new fence object. * *
C Specification
* *

To create a fence, call:

* *

     * VkResult vkCreateFence(
     *     VkDevice                                    device,
     *     const VkFenceCreateInfo*                    pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkFence*                                    pFence);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkFenceCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pFence} must be a valid pointer to a {@code VkFence} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkFenceCreateInfo}

* * @param device the logical device that creates the fence. * @param pCreateInfo a pointer to a {@link VkFenceCreateInfo} structure containing information about how the fence is to be created. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pFence a pointer to a handle in which the resulting fence object is returned. */ @NativeType("VkResult") public static int vkCreateFence(VkDevice device, @NativeType("VkFenceCreateInfo const *") VkFenceCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkFence *") LongBuffer pFence) { if (CHECKS) { check(pFence, 1); } return nvkCreateFence(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pFence)); } // --- [ vkDestroyFence ] --- /** Unsafe version of: {@link #vkDestroyFence DestroyFence} */ public static void nvkDestroyFence(VkDevice device, long fence, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyFence; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), fence, pAllocator, __functionAddress); } /** * Destroy a fence object. * *
C Specification
* *

To destroy a fence, call:

* *

     * void vkDestroyFence(
     *     VkDevice                                    device,
     *     VkFence                                     fence,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All queue submission commands that refer to {@code fence} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code fence} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code fence} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code fence} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be a valid {@code VkFence} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code fence} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code fence} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the fence. * @param fence the handle of the fence to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyFence(VkDevice device, @NativeType("VkFence") long fence, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyFence(device, fence, memAddressSafe(pAllocator)); } // --- [ vkResetFences ] --- /** * Unsafe version of: {@link #vkResetFences ResetFences} * * @param fenceCount the number of fences to reset. */ public static int nvkResetFences(VkDevice device, int fenceCount, long pFences) { long __functionAddress = device.getCapabilities().vkResetFences; return callPPI(device.address(), fenceCount, pFences, __functionAddress); } /** * Resets one or more fence objects. * *
C Specification
* *

To set the state of fences to unsignaled from the host, call:

* *

     * VkResult vkResetFences(
     *     VkDevice                                    device,
     *     uint32_t                                    fenceCount,
     *     const VkFence*                              pFences);
* *
Description
* *

If any member of {@code pFences} currently has its payload imported with temporary permanence, that fence’s prior permanent payload is first restored. The remaining operations described therefore operate on the restored payload.

* *

When {@link #vkResetFences ResetFences} is executed on the host, it defines a fence unsignal operation for each fence, which resets the fence to the unsignaled state.

* *

If any member of {@code pFences} is already in the unsignaled state when {@link #vkResetFences ResetFences} is executed, then {@link #vkResetFences ResetFences} has no effect on that fence.

* *
Valid Usage
* *
    *
  • Each element of {@code pFences} must not be currently associated with any queue command that has not yet completed execution on that queue
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pFences} must be a valid pointer to an array of {@code fenceCount} valid {@code VkFence} handles
  • *
  • {@code fenceCount} must be greater than 0
  • *
  • Each element of {@code pFences} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to each member of {@code pFences} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param device the logical device that owns the fences. * @param pFences a pointer to an array of fence handles to reset. */ @NativeType("VkResult") public static int vkResetFences(VkDevice device, @NativeType("VkFence const *") LongBuffer pFences) { return nvkResetFences(device, pFences.remaining(), memAddress(pFences)); } /** * Resets one or more fence objects. * *
C Specification
* *

To set the state of fences to unsignaled from the host, call:

* *

     * VkResult vkResetFences(
     *     VkDevice                                    device,
     *     uint32_t                                    fenceCount,
     *     const VkFence*                              pFences);
* *
Description
* *

If any member of {@code pFences} currently has its payload imported with temporary permanence, that fence’s prior permanent payload is first restored. The remaining operations described therefore operate on the restored payload.

* *

When {@link #vkResetFences ResetFences} is executed on the host, it defines a fence unsignal operation for each fence, which resets the fence to the unsignaled state.

* *

If any member of {@code pFences} is already in the unsignaled state when {@link #vkResetFences ResetFences} is executed, then {@link #vkResetFences ResetFences} has no effect on that fence.

* *
Valid Usage
* *
    *
  • Each element of {@code pFences} must not be currently associated with any queue command that has not yet completed execution on that queue
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pFences} must be a valid pointer to an array of {@code fenceCount} valid {@code VkFence} handles
  • *
  • {@code fenceCount} must be greater than 0
  • *
  • Each element of {@code pFences} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to each member of {@code pFences} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param device the logical device that owns the fences. */ @NativeType("VkResult") public static int vkResetFences(VkDevice device, @NativeType("VkFence const *") long pFence) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { LongBuffer pFences = stack.longs(pFence); return nvkResetFences(device, 1, memAddress(pFences)); } finally { stack.setPointer(stackPointer); } } // --- [ vkGetFenceStatus ] --- /** * Return the status of a fence. * *
C Specification
* *

To query the status of a fence from the host, call:

* *

     * VkResult vkGetFenceStatus(
     *     VkDevice                                    device,
     *     VkFence                                     fence);
* *
Description
* *

Upon success, {@code vkGetFenceStatus} returns the status of the fence object, with the following return codes:

* *
Fence Object Status Codes
* * * * * * * * *
StatusMeaning
{@link #VK_SUCCESS SUCCESS}The fence specified by {@code fence} is signaled.
{@link #VK_NOT_READY NOT_READY}The fence specified by {@code fence} is unsignaled.
{@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}The device has been lost. See Lost Device.
* *

If a queue submission command is pending execution, then the value returned by this command may immediately be out of date.

* *

If the device has been lost (see Lost Device), {@code vkGetFenceStatus} may return any of the above status codes. If the device has been lost and {@code vkGetFenceStatus} is called repeatedly, it will eventually return either {@link #VK_SUCCESS SUCCESS} or {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code fence} must be a valid {@code VkFence} handle
  • *
  • {@code fence} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_NOT_READY NOT_READY}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* * @param device the logical device that owns the fence. * @param fence the handle of the fence to query. */ @NativeType("VkResult") public static int vkGetFenceStatus(VkDevice device, @NativeType("VkFence") long fence) { long __functionAddress = device.getCapabilities().vkGetFenceStatus; return callPJI(device.address(), fence, __functionAddress); } // --- [ vkWaitForFences ] --- /** * Unsafe version of: {@link #vkWaitForFences WaitForFences} * * @param fenceCount the number of fences to wait on. */ public static int nvkWaitForFences(VkDevice device, int fenceCount, long pFences, int waitAll, long timeout) { long __functionAddress = device.getCapabilities().vkWaitForFences; return callPPJI(device.address(), fenceCount, pFences, waitAll, timeout, __functionAddress); } /** * Wait for one or more fences to become signaled. * *
C Specification
* *

To wait for one or more fences to enter the signaled state on the host, call:

* *

     * VkResult vkWaitForFences(
     *     VkDevice                                    device,
     *     uint32_t                                    fenceCount,
     *     const VkFence*                              pFences,
     *     VkBool32                                    waitAll,
     *     uint64_t                                    timeout);
* *
Description
* *

If the condition is satisfied when {@code vkWaitForFences} is called, then {@code vkWaitForFences} returns immediately. If the condition is not satisfied at the time {@code vkWaitForFences} is called, then {@code vkWaitForFences} will block and wait until the condition is satisfied or the {@code timeout} has expired, whichever is sooner.

* *

If {@code timeout} is zero, then {@code vkWaitForFences} does not wait, but simply returns the current state of the fences. {@link #VK_TIMEOUT TIMEOUT} will be returned in this case if the condition is not satisfied, even though no actual wait was performed.

* *

If the condition is satisfied before the {@code timeout} has expired, {@code vkWaitForFences} returns {@link #VK_SUCCESS SUCCESS}. Otherwise, {@code vkWaitForFences} returns {@link #VK_TIMEOUT TIMEOUT} after the {@code timeout} has expired.

* *

If device loss occurs (see Lost Device) before the timeout has expired, {@code vkWaitForFences} must return in finite time with either {@link #VK_SUCCESS SUCCESS} or {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}.

* *
Note
* *

While we guarantee that {@code vkWaitForFences} must return in finite time, no guarantees are made that it returns immediately upon device loss. However, the client can reasonably expect that the delay will be on the order of seconds and that calling {@code vkWaitForFences} will not result in a permanently (or seemingly permanently) dead process.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pFences} must be a valid pointer to an array of {@code fenceCount} valid {@code VkFence} handles
  • *
  • {@code fenceCount} must be greater than 0
  • *
  • Each element of {@code pFences} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_TIMEOUT TIMEOUT}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* * @param device the logical device that owns the fences. * @param pFences a pointer to an array of {@code fenceCount} fence handles. * @param waitAll the condition that must be satisfied to successfully unblock the wait. If {@code waitAll} is {@link #VK_TRUE TRUE}, then the condition is that all fences in {@code pFences} are signaled. Otherwise, the condition is that at least one fence in {@code pFences} is signaled. * @param timeout the timeout period in units of nanoseconds. {@code timeout} is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond, and may be longer than the requested period. */ @NativeType("VkResult") public static int vkWaitForFences(VkDevice device, @NativeType("VkFence const *") LongBuffer pFences, @NativeType("VkBool32") boolean waitAll, @NativeType("uint64_t") long timeout) { return nvkWaitForFences(device, pFences.remaining(), memAddress(pFences), waitAll ? 1 : 0, timeout); } /** * Wait for one or more fences to become signaled. * *
C Specification
* *

To wait for one or more fences to enter the signaled state on the host, call:

* *

     * VkResult vkWaitForFences(
     *     VkDevice                                    device,
     *     uint32_t                                    fenceCount,
     *     const VkFence*                              pFences,
     *     VkBool32                                    waitAll,
     *     uint64_t                                    timeout);
* *
Description
* *

If the condition is satisfied when {@code vkWaitForFences} is called, then {@code vkWaitForFences} returns immediately. If the condition is not satisfied at the time {@code vkWaitForFences} is called, then {@code vkWaitForFences} will block and wait until the condition is satisfied or the {@code timeout} has expired, whichever is sooner.

* *

If {@code timeout} is zero, then {@code vkWaitForFences} does not wait, but simply returns the current state of the fences. {@link #VK_TIMEOUT TIMEOUT} will be returned in this case if the condition is not satisfied, even though no actual wait was performed.

* *

If the condition is satisfied before the {@code timeout} has expired, {@code vkWaitForFences} returns {@link #VK_SUCCESS SUCCESS}. Otherwise, {@code vkWaitForFences} returns {@link #VK_TIMEOUT TIMEOUT} after the {@code timeout} has expired.

* *

If device loss occurs (see Lost Device) before the timeout has expired, {@code vkWaitForFences} must return in finite time with either {@link #VK_SUCCESS SUCCESS} or {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}.

* *
Note
* *

While we guarantee that {@code vkWaitForFences} must return in finite time, no guarantees are made that it returns immediately upon device loss. However, the client can reasonably expect that the delay will be on the order of seconds and that calling {@code vkWaitForFences} will not result in a permanently (or seemingly permanently) dead process.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pFences} must be a valid pointer to an array of {@code fenceCount} valid {@code VkFence} handles
  • *
  • {@code fenceCount} must be greater than 0
  • *
  • Each element of {@code pFences} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_TIMEOUT TIMEOUT}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* * @param device the logical device that owns the fences. * @param waitAll the condition that must be satisfied to successfully unblock the wait. If {@code waitAll} is {@link #VK_TRUE TRUE}, then the condition is that all fences in {@code pFences} are signaled. Otherwise, the condition is that at least one fence in {@code pFences} is signaled. * @param timeout the timeout period in units of nanoseconds. {@code timeout} is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond, and may be longer than the requested period. */ @NativeType("VkResult") public static int vkWaitForFences(VkDevice device, @NativeType("VkFence const *") long pFence, @NativeType("VkBool32") boolean waitAll, @NativeType("uint64_t") long timeout) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { LongBuffer pFences = stack.longs(pFence); return nvkWaitForFences(device, 1, memAddress(pFences), waitAll ? 1 : 0, timeout); } finally { stack.setPointer(stackPointer); } } // --- [ vkCreateSemaphore ] --- /** Unsafe version of: {@link #vkCreateSemaphore CreateSemaphore} */ public static int nvkCreateSemaphore(VkDevice device, long pCreateInfo, long pAllocator, long pSemaphore) { long __functionAddress = device.getCapabilities().vkCreateSemaphore; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pSemaphore, __functionAddress); } /** * Create a new queue semaphore object. * *
C Specification
* *

To create a semaphore, call:

* *

     * VkResult vkCreateSemaphore(
     *     VkDevice                                    device,
     *     const VkSemaphoreCreateInfo*                pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkSemaphore*                                pSemaphore);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkSemaphoreCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pSemaphore} must be a valid pointer to a {@code VkSemaphore} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkSemaphoreCreateInfo}

* * @param device the logical device that creates the semaphore. * @param pCreateInfo a pointer to a {@link VkSemaphoreCreateInfo} structure containing information about how the semaphore is to be created. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pSemaphore a pointer to a handle in which the resulting semaphore object is returned. */ @NativeType("VkResult") public static int vkCreateSemaphore(VkDevice device, @NativeType("VkSemaphoreCreateInfo const *") VkSemaphoreCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSemaphore *") LongBuffer pSemaphore) { if (CHECKS) { check(pSemaphore, 1); } return nvkCreateSemaphore(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pSemaphore)); } // --- [ vkDestroySemaphore ] --- /** Unsafe version of: {@link #vkDestroySemaphore DestroySemaphore} */ public static void nvkDestroySemaphore(VkDevice device, long semaphore, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroySemaphore; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), semaphore, pAllocator, __functionAddress); } /** * Destroy a semaphore object. * *
C Specification
* *

To destroy a semaphore, call:

* *

     * void vkDestroySemaphore(
     *     VkDevice                                    device,
     *     VkSemaphore                                 semaphore,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted batches that refer to {@code semaphore} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code semaphore} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code semaphore} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code semaphore} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code semaphore} must be a valid {@code VkSemaphore} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code semaphore} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code semaphore} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the semaphore. * @param semaphore the handle of the semaphore to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroySemaphore(VkDevice device, @NativeType("VkSemaphore") long semaphore, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroySemaphore(device, semaphore, memAddressSafe(pAllocator)); } // --- [ vkCreateEvent ] --- /** Unsafe version of: {@link #vkCreateEvent CreateEvent} */ public static int nvkCreateEvent(VkDevice device, long pCreateInfo, long pAllocator, long pEvent) { long __functionAddress = device.getCapabilities().vkCreateEvent; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pEvent, __functionAddress); } /** * Create a new event object. * *
C Specification
* *

To create an event, call:

* *

     * VkResult vkCreateEvent(
     *     VkDevice                                    device,
     *     const VkEventCreateInfo*                    pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkEvent*                                    pEvent);
* *
Description
* *

When created, the event object is in the unsignaled state.

* *
Valid Usage
* *
    *
  • If the {@link KHRPortabilitySubset VK_KHR_portability_subset} extension is enabled, and {@link VkPhysicalDevicePortabilitySubsetFeaturesKHR}{@code ::events} is {@link #VK_FALSE FALSE}, then the implementation does not support events, and {@link #vkCreateEvent CreateEvent} must not be used
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkEventCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pEvent} must be a valid pointer to a {@code VkEvent} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkEventCreateInfo}

* * @param device the logical device that creates the event. * @param pCreateInfo a pointer to a {@link VkEventCreateInfo} structure containing information about how the event is to be created. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pEvent a pointer to a handle in which the resulting event object is returned. */ @NativeType("VkResult") public static int vkCreateEvent(VkDevice device, @NativeType("VkEventCreateInfo const *") VkEventCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkEvent *") LongBuffer pEvent) { if (CHECKS) { check(pEvent, 1); } return nvkCreateEvent(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pEvent)); } // --- [ vkDestroyEvent ] --- /** Unsafe version of: {@link #vkDestroyEvent DestroyEvent} */ public static void nvkDestroyEvent(VkDevice device, long event, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyEvent; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), event, pAllocator, __functionAddress); } /** * Destroy an event object. * *
C Specification
* *

To destroy an event, call:

* *

     * void vkDestroyEvent(
     *     VkDevice                                    device,
     *     VkEvent                                     event,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code event} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code event} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code event} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code event} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code event} must be a valid {@code VkEvent} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code event} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code event} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the event. * @param event the handle of the event to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyEvent(VkDevice device, @NativeType("VkEvent") long event, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyEvent(device, event, memAddressSafe(pAllocator)); } // --- [ vkGetEventStatus ] --- /** * Retrieve the status of an event object. * *
C Specification
* *

To query the state of an event from the host, call:

* *

     * VkResult vkGetEventStatus(
     *     VkDevice                                    device,
     *     VkEvent                                     event);
* *
Description
* *

Upon success, {@code vkGetEventStatus} returns the state of the event object with the following return codes:

* *
Event Object Status Codes
* * * * * * * *
StatusMeaning
{@link #VK_EVENT_SET EVENT_SET}The event specified by {@code event} is signaled.
{@link #VK_EVENT_RESET EVENT_RESET}The event specified by {@code event} is unsignaled.
* *

If a {@code vkCmdSetEvent} or {@code vkCmdResetEvent} command is in a command buffer that is in the pending state, then the value returned by this command may immediately be out of date.

* *

The state of an event can be updated by the host. The state of the event is immediately changed, and subsequent calls to {@code vkGetEventStatus} will return the new state. If an event is already in the requested state, then updating it to the same state has no effect.

* *
Valid Usage
* *
    *
  • {@code event} must not have been created with {@link KHRSynchronization2#VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR EVENT_CREATE_DEVICE_ONLY_BIT_KHR}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code event} must be a valid {@code VkEvent} handle
  • *
  • {@code event} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_EVENT_SET EVENT_SET}
  • *
  • {@link #VK_EVENT_RESET EVENT_RESET}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* * @param device the logical device that owns the event. * @param event the handle of the event to query. */ @NativeType("VkResult") public static int vkGetEventStatus(VkDevice device, @NativeType("VkEvent") long event) { long __functionAddress = device.getCapabilities().vkGetEventStatus; return callPJI(device.address(), event, __functionAddress); } // --- [ vkSetEvent ] --- /** * Set an event to signaled state. * *
C Specification
* *

To set the state of an event to signaled from the host, call:

* *

     * VkResult vkSetEvent(
     *     VkDevice                                    device,
     *     VkEvent                                     event);
* *
Description
* *

When {@link #vkSetEvent SetEvent} is executed on the host, it defines an event signal operation which sets the event to the signaled state.

* *

If {@code event} is already in the signaled state when {@link #vkSetEvent SetEvent} is executed, then {@link #vkSetEvent SetEvent} has no effect, and no event signal operation occurs.

* *
Valid Usage
* *
    *
  • {@code event} must not have been created with {@link KHRSynchronization2#VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR EVENT_CREATE_DEVICE_ONLY_BIT_KHR}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code event} must be a valid {@code VkEvent} handle
  • *
  • {@code event} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code event} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param device the logical device that owns the event. * @param event the event to set. */ @NativeType("VkResult") public static int vkSetEvent(VkDevice device, @NativeType("VkEvent") long event) { long __functionAddress = device.getCapabilities().vkSetEvent; return callPJI(device.address(), event, __functionAddress); } // --- [ vkResetEvent ] --- /** * Reset an event to non-signaled state. * *
C Specification
* *

To set the state of an event to unsignaled from the host, call:

* *

     * VkResult vkResetEvent(
     *     VkDevice                                    device,
     *     VkEvent                                     event);
* *
Description
* *

When {@link #vkResetEvent ResetEvent} is executed on the host, it defines an event unsignal operation which resets the event to the unsignaled state.

* *

If {@code event} is already in the unsignaled state when {@link #vkResetEvent ResetEvent} is executed, then {@link #vkResetEvent ResetEvent} has no effect, and no event unsignal operation occurs.

* *
Valid Usage
* *
    *
  • There must be an execution dependency between {@code vkResetEvent} and the execution of any {@link #vkCmdWaitEvents CmdWaitEvents} that includes {@code event} in its {@code pEvents} parameter
  • *
  • There must be an execution dependency between {@code vkResetEvent} and the execution of any {@link KHRSynchronization2#vkCmdWaitEvents2KHR CmdWaitEvents2KHR} that includes {@code event} in its {@code pEvents} parameter
  • *
  • {@code event} must not have been created with {@link KHRSynchronization2#VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR EVENT_CREATE_DEVICE_ONLY_BIT_KHR}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code event} must be a valid {@code VkEvent} handle
  • *
  • {@code event} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code event} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param device the logical device that owns the event. * @param event the event to reset. */ @NativeType("VkResult") public static int vkResetEvent(VkDevice device, @NativeType("VkEvent") long event) { long __functionAddress = device.getCapabilities().vkResetEvent; return callPJI(device.address(), event, __functionAddress); } // --- [ vkCreateQueryPool ] --- /** Unsafe version of: {@link #vkCreateQueryPool CreateQueryPool} */ public static int nvkCreateQueryPool(VkDevice device, long pCreateInfo, long pAllocator, long pQueryPool) { long __functionAddress = device.getCapabilities().vkCreateQueryPool; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pQueryPool, __functionAddress); } /** * Create a new query pool object. * *
C Specification
* *

To create a query pool, call:

* *

     * VkResult vkCreateQueryPool(
     *     VkDevice                                    device,
     *     const VkQueryPoolCreateInfo*                pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkQueryPool*                                pQueryPool);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkQueryPoolCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pQueryPool} must be a valid pointer to a {@code VkQueryPool} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkQueryPoolCreateInfo}

* * @param device the logical device that creates the query pool. * @param pCreateInfo a pointer to a {@link VkQueryPoolCreateInfo} structure containing the number and type of queries to be managed by the pool. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pQueryPool a pointer to a {@code VkQueryPool} handle in which the resulting query pool object is returned. */ @NativeType("VkResult") public static int vkCreateQueryPool(VkDevice device, @NativeType("VkQueryPoolCreateInfo const *") VkQueryPoolCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkQueryPool *") LongBuffer pQueryPool) { if (CHECKS) { check(pQueryPool, 1); } return nvkCreateQueryPool(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pQueryPool)); } // --- [ vkDestroyQueryPool ] --- /** Unsafe version of: {@link #vkDestroyQueryPool DestroyQueryPool} */ public static void nvkDestroyQueryPool(VkDevice device, long queryPool, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyQueryPool; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), queryPool, pAllocator, __functionAddress); } /** * Destroy a query pool object. * *
C Specification
* *

To destroy a query pool, call:

* *

     * void vkDestroyQueryPool(
     *     VkDevice                                    device,
     *     VkQueryPool                                 queryPool,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code queryPool} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code queryPool} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code queryPool} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Note
* *

Applications can verify that {@code queryPool} can be destroyed by checking that {@code vkGetQueryPoolResults}() without the {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} flag returns {@link #VK_SUCCESS SUCCESS} for all queries that are used in command buffers submitted for execution.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code queryPool} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code queryPool} must be a valid {@code VkQueryPool} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code queryPool} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code queryPool} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the query pool. * @param queryPool the query pool to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyQueryPool(VkDevice device, @NativeType("VkQueryPool") long queryPool, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyQueryPool(device, queryPool, memAddressSafe(pAllocator)); } // --- [ vkGetQueryPoolResults ] --- /** * Unsafe version of: {@link #vkGetQueryPoolResults GetQueryPoolResults} * * @param dataSize the size in bytes of the buffer pointed to by {@code pData}. */ public static int nvkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, long dataSize, long pData, long stride, int flags) { long __functionAddress = device.getCapabilities().vkGetQueryPoolResults; return callPJPPJI(device.address(), queryPool, firstQuery, queryCount, dataSize, pData, stride, flags, __functionAddress); } /** * Copy results of queries in a query pool to a host memory region. * *
C Specification
* *

To retrieve status and results for a set of queries, call:

* *

     * VkResult vkGetQueryPoolResults(
     *     VkDevice                                    device,
     *     VkQueryPool                                 queryPool,
     *     uint32_t                                    firstQuery,
     *     uint32_t                                    queryCount,
     *     size_t                                      dataSize,
     *     void*                                       pData,
     *     VkDeviceSize                                stride,
     *     VkQueryResultFlags                          flags);
* *
Description
* *

The range of queries read is defined by [firstQuery, firstQuery + queryCount - 1]. For pipeline statistics queries, each query index in the pool contains one integer value for each bit that is enabled in {@link VkQueryPoolCreateInfo}{@code ::pipelineStatistics} when the pool is created.

* *

If no bits are set in {@code flags}, and all requested queries are in the available state, results are written as an array of 32-bit unsigned integer values. The behavior when not all queries are available, is described below.

* *

If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is not set and the result overflows a 32-bit value, the value may either wrap or saturate. Similarly, if {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is set and the result overflows a 64-bit value, the value may either wrap or saturate.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is set, Vulkan will wait for each query to be in the available state before retrieving the numerical results for that query. In this case, {@code vkGetQueryPoolResults} is guaranteed to succeed and return {@link #VK_SUCCESS SUCCESS} if the queries become available in a finite time (i.e. if they have been issued and not reset). If queries will never finish (e.g. due to being reset but not issued), then {@code vkGetQueryPoolResults} may not return in finite time.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} and {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} are both not set then no result values are written to {@code pData} for queries that are in the unavailable state at the time of the call, and {@code vkGetQueryPoolResults} returns {@link #VK_NOT_READY NOT_READY}. However, availability state is still written to {@code pData} for those queries if {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is set. Similarly, the status is still written to {@code pData} for those queries if {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} is set.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is not set, {@code vkGetQueryPoolResults} may return {@link #VK_NOT_READY NOT_READY} if there are queries in the unavailable state.

* *
Note
* *

Applications must take care to ensure that use of the {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} bit has the desired effect.

* *

For example, if a query has been used previously and a command buffer records the commands {@code vkCmdResetQueryPool}, {@code vkCmdBeginQuery}, and {@code vkCmdEndQuery} for that query, then the query will remain in the available state until {@code vkResetQueryPool} is called or the {@code vkCmdResetQueryPool} command executes on a queue. Applications can use fences or events to ensure that a query has already been reset before checking for its results or availability status. Otherwise, a stale value could be returned from a previous use of the query.

* *

The above also applies when {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is used in combination with {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}. In this case, the returned availability status may reflect the result of a previous use of the query unless {@code vkResetQueryPool} is called or the {@code vkCmdResetQueryPool} command has been executed since the last use of the query.

* *

A similar situation can arise with the {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} flag.

*
* *
Note
* *

Applications can double-buffer query pool usage, with a pool per frame, and reset queries at the end of the frame in which they are read.

*
* *

If {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} is set, {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is not set, and the query’s status is unavailable, an intermediate result value between zero and the final result value is written to {@code pData} for that query.

* *

If {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is set, the final integer value written for each query is non-zero if the query’s status was available or zero if the status was unavailable. When {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is used, implementations must guarantee that if they return a non-zero availability value then the numerical results must be valid, assuming the results are not reset by a subsequent command.

* *
Note
* *

Satisfying this guarantee may require careful ordering by the application, e.g. to read the availability status before reading the results.

*
* *

If {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} is set, the final integer value written for each query indicates whether the result is available or not, and whether an error occurred. A value of zero indicates that the results are not yet available. Positive values indicate that the operations within the query completed successfully, and the query results are valid. Negative values indicate that the operations within the query completed unsuccessfully.

* *

Specific result codes are defined by the {@code VkQueryResultStatusKHR} enumeration.

* *
Valid Usage
* *
    *
  • {@code firstQuery} must be less than the number of queries in {@code queryPool}
  • *
  • If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is not set in {@code flags} and the {@code queryType} used to create {@code queryPool} was not {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, then {@code pData} and {@code stride} must be multiples of 4
  • *
  • If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is set in {@code flags} then {@code pData} and {@code stride} must be multiples of 8
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, then {@code pData} and {@code stride} must be multiples of the size of {@link VkPerformanceCounterResultKHR}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, then {@code stride} must be large enough to contain {@link VkQueryPoolPerformanceCreateInfoKHR}{@code ::counterIndexCount} used to create {@code queryPool} times the size of {@link VkPerformanceCounterResultKHR}
  • *
  • The sum of {@code firstQuery} and {@code queryCount} must be less than or equal to the number of queries in {@code queryPool}
  • *
  • {@code dataSize} must be large enough to contain the result of each query, as described here
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link #VK_QUERY_TYPE_TIMESTAMP QUERY_TYPE_TIMESTAMP}, {@code flags} must not contain {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, {@code flags} must not contain {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}, {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} or {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, the {@code queryPool} must have been recorded once for each pass as retrieved via a call to {@link KHRPerformanceQuery#vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRVideoQueue#VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR QUERY_TYPE_RESULT_STATUS_ONLY_KHR}, {@code flags} must include {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR}
  • *
  • If {@code flags} includes {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR}, it must not include {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code queryPool} must be a valid {@code VkQueryPool} handle
  • *
  • {@code pData} must be a valid pointer to an array of {@code dataSize} bytes
  • *
  • {@code flags} must be a valid combination of {@code VkQueryResultFlagBits} values
  • *
  • {@code dataSize} must be greater than 0
  • *
  • {@code queryPool} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_NOT_READY NOT_READY}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* * @param device the logical device that owns the query pool. * @param queryPool the query pool managing the queries containing the desired results. * @param firstQuery the initial query index. * @param queryCount the number of queries to read. * @param pData a pointer to a user-allocated buffer where the results will be written * @param stride the stride in bytes between results for individual queries within {@code pData}. * @param flags a bitmask of {@code VkQueryResultFlagBits} specifying how and when results are returned. */ @NativeType("VkResult") public static int vkGetQueryPoolResults(VkDevice device, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int firstQuery, @NativeType("uint32_t") int queryCount, @NativeType("void *") ByteBuffer pData, @NativeType("VkDeviceSize") long stride, @NativeType("VkQueryResultFlags") int flags) { return nvkGetQueryPoolResults(device, queryPool, firstQuery, queryCount, pData.remaining(), memAddress(pData), stride, flags); } /** * Copy results of queries in a query pool to a host memory region. * *
C Specification
* *

To retrieve status and results for a set of queries, call:

* *

     * VkResult vkGetQueryPoolResults(
     *     VkDevice                                    device,
     *     VkQueryPool                                 queryPool,
     *     uint32_t                                    firstQuery,
     *     uint32_t                                    queryCount,
     *     size_t                                      dataSize,
     *     void*                                       pData,
     *     VkDeviceSize                                stride,
     *     VkQueryResultFlags                          flags);
* *
Description
* *

The range of queries read is defined by [firstQuery, firstQuery + queryCount - 1]. For pipeline statistics queries, each query index in the pool contains one integer value for each bit that is enabled in {@link VkQueryPoolCreateInfo}{@code ::pipelineStatistics} when the pool is created.

* *

If no bits are set in {@code flags}, and all requested queries are in the available state, results are written as an array of 32-bit unsigned integer values. The behavior when not all queries are available, is described below.

* *

If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is not set and the result overflows a 32-bit value, the value may either wrap or saturate. Similarly, if {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is set and the result overflows a 64-bit value, the value may either wrap or saturate.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is set, Vulkan will wait for each query to be in the available state before retrieving the numerical results for that query. In this case, {@code vkGetQueryPoolResults} is guaranteed to succeed and return {@link #VK_SUCCESS SUCCESS} if the queries become available in a finite time (i.e. if they have been issued and not reset). If queries will never finish (e.g. due to being reset but not issued), then {@code vkGetQueryPoolResults} may not return in finite time.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} and {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} are both not set then no result values are written to {@code pData} for queries that are in the unavailable state at the time of the call, and {@code vkGetQueryPoolResults} returns {@link #VK_NOT_READY NOT_READY}. However, availability state is still written to {@code pData} for those queries if {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is set. Similarly, the status is still written to {@code pData} for those queries if {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} is set.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is not set, {@code vkGetQueryPoolResults} may return {@link #VK_NOT_READY NOT_READY} if there are queries in the unavailable state.

* *
Note
* *

Applications must take care to ensure that use of the {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} bit has the desired effect.

* *

For example, if a query has been used previously and a command buffer records the commands {@code vkCmdResetQueryPool}, {@code vkCmdBeginQuery}, and {@code vkCmdEndQuery} for that query, then the query will remain in the available state until {@code vkResetQueryPool} is called or the {@code vkCmdResetQueryPool} command executes on a queue. Applications can use fences or events to ensure that a query has already been reset before checking for its results or availability status. Otherwise, a stale value could be returned from a previous use of the query.

* *

The above also applies when {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is used in combination with {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}. In this case, the returned availability status may reflect the result of a previous use of the query unless {@code vkResetQueryPool} is called or the {@code vkCmdResetQueryPool} command has been executed since the last use of the query.

* *

A similar situation can arise with the {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} flag.

*
* *
Note
* *

Applications can double-buffer query pool usage, with a pool per frame, and reset queries at the end of the frame in which they are read.

*
* *

If {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} is set, {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is not set, and the query’s status is unavailable, an intermediate result value between zero and the final result value is written to {@code pData} for that query.

* *

If {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is set, the final integer value written for each query is non-zero if the query’s status was available or zero if the status was unavailable. When {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is used, implementations must guarantee that if they return a non-zero availability value then the numerical results must be valid, assuming the results are not reset by a subsequent command.

* *
Note
* *

Satisfying this guarantee may require careful ordering by the application, e.g. to read the availability status before reading the results.

*
* *

If {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} is set, the final integer value written for each query indicates whether the result is available or not, and whether an error occurred. A value of zero indicates that the results are not yet available. Positive values indicate that the operations within the query completed successfully, and the query results are valid. Negative values indicate that the operations within the query completed unsuccessfully.

* *

Specific result codes are defined by the {@code VkQueryResultStatusKHR} enumeration.

* *
Valid Usage
* *
    *
  • {@code firstQuery} must be less than the number of queries in {@code queryPool}
  • *
  • If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is not set in {@code flags} and the {@code queryType} used to create {@code queryPool} was not {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, then {@code pData} and {@code stride} must be multiples of 4
  • *
  • If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is set in {@code flags} then {@code pData} and {@code stride} must be multiples of 8
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, then {@code pData} and {@code stride} must be multiples of the size of {@link VkPerformanceCounterResultKHR}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, then {@code stride} must be large enough to contain {@link VkQueryPoolPerformanceCreateInfoKHR}{@code ::counterIndexCount} used to create {@code queryPool} times the size of {@link VkPerformanceCounterResultKHR}
  • *
  • The sum of {@code firstQuery} and {@code queryCount} must be less than or equal to the number of queries in {@code queryPool}
  • *
  • {@code dataSize} must be large enough to contain the result of each query, as described here
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link #VK_QUERY_TYPE_TIMESTAMP QUERY_TYPE_TIMESTAMP}, {@code flags} must not contain {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, {@code flags} must not contain {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}, {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} or {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, the {@code queryPool} must have been recorded once for each pass as retrieved via a call to {@link KHRPerformanceQuery#vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRVideoQueue#VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR QUERY_TYPE_RESULT_STATUS_ONLY_KHR}, {@code flags} must include {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR}
  • *
  • If {@code flags} includes {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR}, it must not include {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code queryPool} must be a valid {@code VkQueryPool} handle
  • *
  • {@code pData} must be a valid pointer to an array of {@code dataSize} bytes
  • *
  • {@code flags} must be a valid combination of {@code VkQueryResultFlagBits} values
  • *
  • {@code dataSize} must be greater than 0
  • *
  • {@code queryPool} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_NOT_READY NOT_READY}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* * @param device the logical device that owns the query pool. * @param queryPool the query pool managing the queries containing the desired results. * @param firstQuery the initial query index. * @param queryCount the number of queries to read. * @param pData a pointer to a user-allocated buffer where the results will be written * @param stride the stride in bytes between results for individual queries within {@code pData}. * @param flags a bitmask of {@code VkQueryResultFlagBits} specifying how and when results are returned. */ @NativeType("VkResult") public static int vkGetQueryPoolResults(VkDevice device, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int firstQuery, @NativeType("uint32_t") int queryCount, @NativeType("void *") IntBuffer pData, @NativeType("VkDeviceSize") long stride, @NativeType("VkQueryResultFlags") int flags) { return nvkGetQueryPoolResults(device, queryPool, firstQuery, queryCount, Integer.toUnsignedLong(pData.remaining()) << 2, memAddress(pData), stride, flags); } /** * Copy results of queries in a query pool to a host memory region. * *
C Specification
* *

To retrieve status and results for a set of queries, call:

* *

     * VkResult vkGetQueryPoolResults(
     *     VkDevice                                    device,
     *     VkQueryPool                                 queryPool,
     *     uint32_t                                    firstQuery,
     *     uint32_t                                    queryCount,
     *     size_t                                      dataSize,
     *     void*                                       pData,
     *     VkDeviceSize                                stride,
     *     VkQueryResultFlags                          flags);
* *
Description
* *

The range of queries read is defined by [firstQuery, firstQuery + queryCount - 1]. For pipeline statistics queries, each query index in the pool contains one integer value for each bit that is enabled in {@link VkQueryPoolCreateInfo}{@code ::pipelineStatistics} when the pool is created.

* *

If no bits are set in {@code flags}, and all requested queries are in the available state, results are written as an array of 32-bit unsigned integer values. The behavior when not all queries are available, is described below.

* *

If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is not set and the result overflows a 32-bit value, the value may either wrap or saturate. Similarly, if {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is set and the result overflows a 64-bit value, the value may either wrap or saturate.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is set, Vulkan will wait for each query to be in the available state before retrieving the numerical results for that query. In this case, {@code vkGetQueryPoolResults} is guaranteed to succeed and return {@link #VK_SUCCESS SUCCESS} if the queries become available in a finite time (i.e. if they have been issued and not reset). If queries will never finish (e.g. due to being reset but not issued), then {@code vkGetQueryPoolResults} may not return in finite time.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} and {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} are both not set then no result values are written to {@code pData} for queries that are in the unavailable state at the time of the call, and {@code vkGetQueryPoolResults} returns {@link #VK_NOT_READY NOT_READY}. However, availability state is still written to {@code pData} for those queries if {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is set. Similarly, the status is still written to {@code pData} for those queries if {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} is set.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is not set, {@code vkGetQueryPoolResults} may return {@link #VK_NOT_READY NOT_READY} if there are queries in the unavailable state.

* *
Note
* *

Applications must take care to ensure that use of the {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} bit has the desired effect.

* *

For example, if a query has been used previously and a command buffer records the commands {@code vkCmdResetQueryPool}, {@code vkCmdBeginQuery}, and {@code vkCmdEndQuery} for that query, then the query will remain in the available state until {@code vkResetQueryPool} is called or the {@code vkCmdResetQueryPool} command executes on a queue. Applications can use fences or events to ensure that a query has already been reset before checking for its results or availability status. Otherwise, a stale value could be returned from a previous use of the query.

* *

The above also applies when {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is used in combination with {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}. In this case, the returned availability status may reflect the result of a previous use of the query unless {@code vkResetQueryPool} is called or the {@code vkCmdResetQueryPool} command has been executed since the last use of the query.

* *

A similar situation can arise with the {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} flag.

*
* *
Note
* *

Applications can double-buffer query pool usage, with a pool per frame, and reset queries at the end of the frame in which they are read.

*
* *

If {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} is set, {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is not set, and the query’s status is unavailable, an intermediate result value between zero and the final result value is written to {@code pData} for that query.

* *

If {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is set, the final integer value written for each query is non-zero if the query’s status was available or zero if the status was unavailable. When {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is used, implementations must guarantee that if they return a non-zero availability value then the numerical results must be valid, assuming the results are not reset by a subsequent command.

* *
Note
* *

Satisfying this guarantee may require careful ordering by the application, e.g. to read the availability status before reading the results.

*
* *

If {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR} is set, the final integer value written for each query indicates whether the result is available or not, and whether an error occurred. A value of zero indicates that the results are not yet available. Positive values indicate that the operations within the query completed successfully, and the query results are valid. Negative values indicate that the operations within the query completed unsuccessfully.

* *

Specific result codes are defined by the {@code VkQueryResultStatusKHR} enumeration.

* *
Valid Usage
* *
    *
  • {@code firstQuery} must be less than the number of queries in {@code queryPool}
  • *
  • If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is not set in {@code flags} and the {@code queryType} used to create {@code queryPool} was not {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, then {@code pData} and {@code stride} must be multiples of 4
  • *
  • If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is set in {@code flags} then {@code pData} and {@code stride} must be multiples of 8
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, then {@code pData} and {@code stride} must be multiples of the size of {@link VkPerformanceCounterResultKHR}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, then {@code stride} must be large enough to contain {@link VkQueryPoolPerformanceCreateInfoKHR}{@code ::counterIndexCount} used to create {@code queryPool} times the size of {@link VkPerformanceCounterResultKHR}
  • *
  • The sum of {@code firstQuery} and {@code queryCount} must be less than or equal to the number of queries in {@code queryPool}
  • *
  • {@code dataSize} must be large enough to contain the result of each query, as described here
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link #VK_QUERY_TYPE_TIMESTAMP QUERY_TYPE_TIMESTAMP}, {@code flags} must not contain {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, {@code flags} must not contain {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}, {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} or {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, the {@code queryPool} must have been recorded once for each pass as retrieved via a call to {@link KHRPerformanceQuery#vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRVideoQueue#VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR QUERY_TYPE_RESULT_STATUS_ONLY_KHR}, {@code flags} must include {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR}
  • *
  • If {@code flags} includes {@link KHRVideoQueue#VK_QUERY_RESULT_WITH_STATUS_BIT_KHR QUERY_RESULT_WITH_STATUS_BIT_KHR}, it must not include {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code queryPool} must be a valid {@code VkQueryPool} handle
  • *
  • {@code pData} must be a valid pointer to an array of {@code dataSize} bytes
  • *
  • {@code flags} must be a valid combination of {@code VkQueryResultFlagBits} values
  • *
  • {@code dataSize} must be greater than 0
  • *
  • {@code queryPool} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_NOT_READY NOT_READY}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
  • *
*
* * @param device the logical device that owns the query pool. * @param queryPool the query pool managing the queries containing the desired results. * @param firstQuery the initial query index. * @param queryCount the number of queries to read. * @param pData a pointer to a user-allocated buffer where the results will be written * @param stride the stride in bytes between results for individual queries within {@code pData}. * @param flags a bitmask of {@code VkQueryResultFlagBits} specifying how and when results are returned. */ @NativeType("VkResult") public static int vkGetQueryPoolResults(VkDevice device, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int firstQuery, @NativeType("uint32_t") int queryCount, @NativeType("void *") LongBuffer pData, @NativeType("VkDeviceSize") long stride, @NativeType("VkQueryResultFlags") int flags) { return nvkGetQueryPoolResults(device, queryPool, firstQuery, queryCount, Integer.toUnsignedLong(pData.remaining()) << 3, memAddress(pData), stride, flags); } // --- [ vkCreateBuffer ] --- /** Unsafe version of: {@link #vkCreateBuffer CreateBuffer} */ public static int nvkCreateBuffer(VkDevice device, long pCreateInfo, long pAllocator, long pBuffer) { long __functionAddress = device.getCapabilities().vkCreateBuffer; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pBuffer, __functionAddress); } /** * Create a new buffer object. * *
C Specification
* *

To create buffers, call:

* *

     * VkResult vkCreateBuffer(
     *     VkDevice                                    device,
     *     const VkBufferCreateInfo*                   pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkBuffer*                                   pBuffer);
* *
Valid Usage
* *
    *
  • If the {@code flags} member of {@code pCreateInfo} includes {@link #VK_BUFFER_CREATE_SPARSE_BINDING_BIT BUFFER_CREATE_SPARSE_BINDING_BIT}, creating this {@code VkBuffer} must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed {@link VkPhysicalDeviceLimits}{@code ::sparseAddressSpaceSize}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkBufferCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pBuffer} must be a valid pointer to a {@code VkBuffer} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link KHRBufferDeviceAddress#VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkBufferCreateInfo}

* * @param device the logical device that creates the buffer object. * @param pCreateInfo a pointer to a {@link VkBufferCreateInfo} structure containing parameters affecting creation of the buffer. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pBuffer a pointer to a {@code VkBuffer} handle in which the resulting buffer object is returned. */ @NativeType("VkResult") public static int vkCreateBuffer(VkDevice device, @NativeType("VkBufferCreateInfo const *") VkBufferCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkBuffer *") LongBuffer pBuffer) { if (CHECKS) { check(pBuffer, 1); } return nvkCreateBuffer(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pBuffer)); } // --- [ vkDestroyBuffer ] --- /** Unsafe version of: {@link #vkDestroyBuffer DestroyBuffer} */ public static void nvkDestroyBuffer(VkDevice device, long buffer, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyBuffer; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), buffer, pAllocator, __functionAddress); } /** * Destroy a buffer object. * *
C Specification
* *

To destroy a buffer, call:

* *

     * void vkDestroyBuffer(
     *     VkDevice                                    device,
     *     VkBuffer                                    buffer,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code buffer}, either directly or via a {@code VkBufferView}, must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code buffer} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code buffer} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code buffer} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code buffer} must be a valid {@code VkBuffer} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code buffer} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code buffer} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the buffer. * @param buffer the buffer to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyBuffer(VkDevice device, @NativeType("VkBuffer") long buffer, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyBuffer(device, buffer, memAddressSafe(pAllocator)); } // --- [ vkCreateBufferView ] --- /** Unsafe version of: {@link #vkCreateBufferView CreateBufferView} */ public static int nvkCreateBufferView(VkDevice device, long pCreateInfo, long pAllocator, long pView) { long __functionAddress = device.getCapabilities().vkCreateBufferView; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pView, __functionAddress); } /** * Create a new buffer view object. * *
C Specification
* *

To create a buffer view, call:

* *

     * VkResult vkCreateBufferView(
     *     VkDevice                                    device,
     *     const VkBufferViewCreateInfo*               pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkBufferView*                               pView);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkBufferViewCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pView} must be a valid pointer to a {@code VkBufferView} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkBufferViewCreateInfo}

* * @param device the logical device that creates the buffer view. * @param pCreateInfo a pointer to a {@link VkBufferViewCreateInfo} structure containing parameters to be used to create the buffer view. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pView a pointer to a {@code VkBufferView} handle in which the resulting buffer view object is returned. */ @NativeType("VkResult") public static int vkCreateBufferView(VkDevice device, @NativeType("VkBufferViewCreateInfo const *") VkBufferViewCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkBufferView *") LongBuffer pView) { if (CHECKS) { check(pView, 1); } return nvkCreateBufferView(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pView)); } // --- [ vkDestroyBufferView ] --- /** Unsafe version of: {@link #vkDestroyBufferView DestroyBufferView} */ public static void nvkDestroyBufferView(VkDevice device, long bufferView, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyBufferView; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), bufferView, pAllocator, __functionAddress); } /** * Destroy a buffer view object. * *
C Specification
* *

To destroy a buffer view, call:

* *

     * void vkDestroyBufferView(
     *     VkDevice                                    device,
     *     VkBufferView                                bufferView,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code bufferView} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code bufferView} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code bufferView} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code bufferView} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code bufferView} must be a valid {@code VkBufferView} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code bufferView} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code bufferView} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the buffer view. * @param bufferView the buffer view to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyBufferView(VkDevice device, @NativeType("VkBufferView") long bufferView, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyBufferView(device, bufferView, memAddressSafe(pAllocator)); } // --- [ vkCreateImage ] --- /** Unsafe version of: {@link #vkCreateImage CreateImage} */ public static int nvkCreateImage(VkDevice device, long pCreateInfo, long pAllocator, long pImage) { long __functionAddress = device.getCapabilities().vkCreateImage; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pImage, __functionAddress); } /** * Create a new image object. * *
C Specification
* *

To create images, call:

* *

     * VkResult vkCreateImage(
     *     VkDevice                                    device,
     *     const VkImageCreateInfo*                    pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkImage*                                    pImage);
* *
Valid Usage
* *
    *
  • If the {@code flags} member of {@code pCreateInfo} includes {@link #VK_IMAGE_CREATE_SPARSE_BINDING_BIT IMAGE_CREATE_SPARSE_BINDING_BIT}, creating this {@code VkImage} must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed {@link VkPhysicalDeviceLimits}{@code ::sparseAddressSpaceSize}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkImageCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pImage} must be a valid pointer to a {@code VkImage} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkImageCreateInfo}

* * @param device the logical device that creates the image. * @param pCreateInfo a pointer to a {@link VkImageCreateInfo} structure containing parameters to be used to create the image. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pImage a pointer to a {@code VkImage} handle in which the resulting image object is returned. */ @NativeType("VkResult") public static int vkCreateImage(VkDevice device, @NativeType("VkImageCreateInfo const *") VkImageCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkImage *") LongBuffer pImage) { if (CHECKS) { check(pImage, 1); } return nvkCreateImage(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pImage)); } // --- [ vkDestroyImage ] --- /** Unsafe version of: {@link #vkDestroyImage DestroyImage} */ public static void nvkDestroyImage(VkDevice device, long image, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyImage; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), image, pAllocator, __functionAddress); } /** * Destroy an image object. * *
C Specification
* *

To destroy an image, call:

* *

     * void vkDestroyImage(
     *     VkDevice                                    device,
     *     VkImage                                     image,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code image}, either directly or via a {@code VkImageView}, must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code image} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code image} was created, {@code pAllocator} must be {@code NULL}
  • *
  • {@code image} must not have been acquired from {@link KHRSwapchain#vkGetSwapchainImagesKHR GetSwapchainImagesKHR}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code image} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code image} must be a valid {@code VkImage} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code image} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code image} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the image. * @param image the image to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyImage(VkDevice device, @NativeType("VkImage") long image, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyImage(device, image, memAddressSafe(pAllocator)); } // --- [ vkGetImageSubresourceLayout ] --- /** Unsafe version of: {@link #vkGetImageSubresourceLayout GetImageSubresourceLayout} */ public static void nvkGetImageSubresourceLayout(VkDevice device, long image, long pSubresource, long pLayout) { long __functionAddress = device.getCapabilities().vkGetImageSubresourceLayout; callPJPPV(device.address(), image, pSubresource, pLayout, __functionAddress); } /** * Retrieve information about an image subresource. * *
C Specification
* *

To query the memory layout of an image subresource, call:

* *

     * void vkGetImageSubresourceLayout(
     *     VkDevice                                    device,
     *     VkImage                                     image,
     *     const VkImageSubresource*                   pSubresource,
     *     VkSubresourceLayout*                        pLayout);
* *
Description
* *

If the image is linear, then the returned layout is valid for host access.

* *

If the image’s tiling is {@link #VK_IMAGE_TILING_LINEAR IMAGE_TILING_LINEAR} and its format is a multi-planar format, then {@code vkGetImageSubresourceLayout} describes one format plane of the image. If the image’s tiling is {@link EXTImageDrmFormatModifier#VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT}, then {@code vkGetImageSubresourceLayout} describes one memory plane of the image. If the image’s tiling is {@link EXTImageDrmFormatModifier#VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT} and the image is non-linear, then the returned layout has an implementation-dependent meaning; the vendor of the image’s DRM format modifier may provide documentation that explains how to interpret the returned layout.

* *

{@code vkGetImageSubresourceLayout} is invariant for the lifetime of a single image.

* *
Valid Usage
* *
    *
  • {@code image} must have been created with {@code tiling} equal to {@link #VK_IMAGE_TILING_LINEAR IMAGE_TILING_LINEAR} or {@link EXTImageDrmFormatModifier#VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT}
  • *
  • The {@code aspectMask} member of {@code pSubresource} must only have a single bit set
  • *
  • The {@code mipLevel} member of {@code pSubresource} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • The {@code arrayLayer} member of {@code pSubresource} must be less than the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • If {@code format} is a color format, the {@code aspectMask} member of {@code pSubresource} must be {@link #VK_IMAGE_ASPECT_COLOR_BIT IMAGE_ASPECT_COLOR_BIT}
  • *
  • If {@code format} has a depth component, the {@code aspectMask} member of {@code pSubresource} must contain {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT}
  • *
  • If {@code format} has a stencil component, the {@code aspectMask} member of {@code pSubresource} must contain {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}
  • *
  • If {@code format} does not contain a stencil or depth component, the {@code aspectMask} member of {@code pSubresource} must not contain {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT} or {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}
  • *
  • If the {@code tiling} of the {@code image} is {@link #VK_IMAGE_TILING_LINEAR IMAGE_TILING_LINEAR} and its {@code format} is a multi-planar format with two planes, the {@code aspectMask} member of {@code pSubresource} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} or {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}
  • *
  • If the {@code tiling} of the {@code image} is {@link #VK_IMAGE_TILING_LINEAR IMAGE_TILING_LINEAR} and its {@code format} is a multi-planar format with three planes, the {@code aspectMask} member of {@code pSubresource} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT}, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} or {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT}
  • *
  • If the {@code tiling} of the {@code image} is {@link EXTImageDrmFormatModifier#VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT}, then the {@code aspectMask} member of {@code pSubresource} must be VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT and the index i must be less than the {@link VkDrmFormatModifierPropertiesEXT}{@code ::drmFormatModifierPlaneCount} associated with the image’s {@code format} and {@link VkImageDrmFormatModifierPropertiesEXT}{@code ::drmFormatModifier}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code image} must be a valid {@code VkImage} handle
  • *
  • {@code pSubresource} must be a valid pointer to a valid {@link VkImageSubresource} structure
  • *
  • {@code pLayout} must be a valid pointer to a {@link VkSubresourceLayout} structure
  • *
  • {@code image} must have been created, allocated, or retrieved from {@code device}
  • *
* *
See Also
* *

{@link VkImageSubresource}, {@link VkSubresourceLayout}

* * @param device the logical device that owns the image. * @param image the image whose layout is being queried. * @param pSubresource a pointer to a {@link VkImageSubresource} structure selecting a specific image for the image subresource. * @param pLayout a pointer to a {@link VkSubresourceLayout} structure in which the layout is returned. */ public static void vkGetImageSubresourceLayout(VkDevice device, @NativeType("VkImage") long image, @NativeType("VkImageSubresource const *") VkImageSubresource pSubresource, @NativeType("VkSubresourceLayout *") VkSubresourceLayout pLayout) { nvkGetImageSubresourceLayout(device, image, pSubresource.address(), pLayout.address()); } // --- [ vkCreateImageView ] --- /** Unsafe version of: {@link #vkCreateImageView CreateImageView} */ public static int nvkCreateImageView(VkDevice device, long pCreateInfo, long pAllocator, long pView) { long __functionAddress = device.getCapabilities().vkCreateImageView; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pView, __functionAddress); } /** * Create an image view from an existing image. * *
C Specification
* *

To create an image view, call:

* *

     * VkResult vkCreateImageView(
     *     VkDevice                                    device,
     *     const VkImageViewCreateInfo*                pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkImageView*                                pView);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkImageViewCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pView} must be a valid pointer to a {@code VkImageView} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkImageViewCreateInfo}

* * @param device the logical device that creates the image view. * @param pCreateInfo a pointer to a {@link VkImageViewCreateInfo} structure containing parameters to be used to create the image view. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pView a pointer to a {@code VkImageView} handle in which the resulting image view object is returned. */ @NativeType("VkResult") public static int vkCreateImageView(VkDevice device, @NativeType("VkImageViewCreateInfo const *") VkImageViewCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkImageView *") LongBuffer pView) { if (CHECKS) { check(pView, 1); } return nvkCreateImageView(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pView)); } // --- [ vkDestroyImageView ] --- /** Unsafe version of: {@link #vkDestroyImageView DestroyImageView} */ public static void nvkDestroyImageView(VkDevice device, long imageView, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyImageView; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), imageView, pAllocator, __functionAddress); } /** * Destroy an image view object. * *
C Specification
* *

To destroy an image view, call:

* *

     * void vkDestroyImageView(
     *     VkDevice                                    device,
     *     VkImageView                                 imageView,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code imageView} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code imageView} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code imageView} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code imageView} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code imageView} must be a valid {@code VkImageView} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code imageView} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code imageView} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the image view. * @param imageView the image view to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyImageView(VkDevice device, @NativeType("VkImageView") long imageView, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyImageView(device, imageView, memAddressSafe(pAllocator)); } // --- [ vkCreateShaderModule ] --- /** Unsafe version of: {@link #vkCreateShaderModule CreateShaderModule} */ public static int nvkCreateShaderModule(VkDevice device, long pCreateInfo, long pAllocator, long pShaderModule) { long __functionAddress = device.getCapabilities().vkCreateShaderModule; if (CHECKS) { VkShaderModuleCreateInfo.validate(pCreateInfo); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pShaderModule, __functionAddress); } /** * Creates a new shader module object. * *
C Specification
* *

To create a shader module, call:

* *

     * VkResult vkCreateShaderModule(
     *     VkDevice                                    device,
     *     const VkShaderModuleCreateInfo*             pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkShaderModule*                             pShaderModule);
* *
Description
* *

Once a shader module has been created, any entry points it contains can be used in pipeline shader stages as described in Compute Pipelines and Graphics Pipelines.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkShaderModuleCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pShaderModule} must be a valid pointer to a {@code VkShaderModule} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link NVGLSLShader#VK_ERROR_INVALID_SHADER_NV ERROR_INVALID_SHADER_NV}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkShaderModuleCreateInfo}

* * @param device the logical device that creates the shader module. * @param pCreateInfo a pointer to a {@link VkShaderModuleCreateInfo} structure. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pShaderModule a pointer to a {@code VkShaderModule} handle in which the resulting shader module object is returned. */ @NativeType("VkResult") public static int vkCreateShaderModule(VkDevice device, @NativeType("VkShaderModuleCreateInfo const *") VkShaderModuleCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkShaderModule *") LongBuffer pShaderModule) { if (CHECKS) { check(pShaderModule, 1); } return nvkCreateShaderModule(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pShaderModule)); } // --- [ vkDestroyShaderModule ] --- /** Unsafe version of: {@link #vkDestroyShaderModule DestroyShaderModule} */ public static void nvkDestroyShaderModule(VkDevice device, long shaderModule, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyShaderModule; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), shaderModule, pAllocator, __functionAddress); } /** * Destroy a shader module. * *
C Specification
* *

To destroy a shader module, call:

* *

     * void vkDestroyShaderModule(
     *     VkDevice                                    device,
     *     VkShaderModule                              shaderModule,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Description
* *

A shader module can be destroyed while pipelines created using its shaders are still in use.

* *
Valid Usage
* *
    *
  • If {@link VkAllocationCallbacks} were provided when {@code shaderModule} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code shaderModule} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code shaderModule} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code shaderModule} must be a valid {@code VkShaderModule} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code shaderModule} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code shaderModule} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the shader module. * @param shaderModule the handle of the shader module to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyShaderModule(VkDevice device, @NativeType("VkShaderModule") long shaderModule, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyShaderModule(device, shaderModule, memAddressSafe(pAllocator)); } // --- [ vkCreatePipelineCache ] --- /** Unsafe version of: {@link #vkCreatePipelineCache CreatePipelineCache} */ public static int nvkCreatePipelineCache(VkDevice device, long pCreateInfo, long pAllocator, long pPipelineCache) { long __functionAddress = device.getCapabilities().vkCreatePipelineCache; if (CHECKS) { VkPipelineCacheCreateInfo.validate(pCreateInfo); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pPipelineCache, __functionAddress); } /** * Creates a new pipeline cache. * *
C Specification
* *

To create pipeline cache objects, call:

* *

     * VkResult vkCreatePipelineCache(
     *     VkDevice                                    device,
     *     const VkPipelineCacheCreateInfo*            pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkPipelineCache*                            pPipelineCache);
* *
Description
* *
Note
* *

Applications can track and manage the total host memory size of a pipeline cache object using the {@code pAllocator}. Applications can limit the amount of data retrieved from a pipeline cache object in {@code vkGetPipelineCacheData}. Implementations should not internally limit the total number of entries added to a pipeline cache object or the total host memory consumed.

*
* *

Once created, a pipeline cache can be passed to the {@link #vkCreateGraphicsPipelines CreateGraphicsPipelines} {@link KHRRayTracingPipeline#vkCreateRayTracingPipelinesKHR CreateRayTracingPipelinesKHR}, {@link NVRayTracing#vkCreateRayTracingPipelinesNV CreateRayTracingPipelinesNV}, and {@link #vkCreateComputePipelines CreateComputePipelines} commands. If the pipeline cache passed into these commands is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the implementation will query it for possible reuse opportunities and update it with new content. The use of the pipeline cache object in these commands is internally synchronized, and the same pipeline cache object can be used in multiple threads simultaneously.

* *

If {@code flags} of {@code pCreateInfo} includes {@link EXTPipelineCreationCacheControl#VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT}, all commands that modify the returned pipeline cache object must be externally synchronized.

* *
Note
* *

Implementations should make every effort to limit any critical sections to the actual accesses to the cache, which is expected to be significantly shorter than the duration of the {@code vkCreate*Pipelines} commands.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkPipelineCacheCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pPipelineCache} must be a valid pointer to a {@code VkPipelineCache} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkPipelineCacheCreateInfo}

* * @param device the logical device that creates the pipeline cache object. * @param pCreateInfo a pointer to a {@link VkPipelineCacheCreateInfo} structure containing initial parameters for the pipeline cache object. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pPipelineCache a pointer to a {@code VkPipelineCache} handle in which the resulting pipeline cache object is returned. */ @NativeType("VkResult") public static int vkCreatePipelineCache(VkDevice device, @NativeType("VkPipelineCacheCreateInfo const *") VkPipelineCacheCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPipelineCache *") LongBuffer pPipelineCache) { if (CHECKS) { check(pPipelineCache, 1); } return nvkCreatePipelineCache(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pPipelineCache)); } // --- [ vkDestroyPipelineCache ] --- /** Unsafe version of: {@link #vkDestroyPipelineCache DestroyPipelineCache} */ public static void nvkDestroyPipelineCache(VkDevice device, long pipelineCache, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyPipelineCache; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), pipelineCache, pAllocator, __functionAddress); } /** * Destroy a pipeline cache object. * *
C Specification
* *

To destroy a pipeline cache, call:

* *

     * void vkDestroyPipelineCache(
     *     VkDevice                                    device,
     *     VkPipelineCache                             pipelineCache,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • If {@link VkAllocationCallbacks} were provided when {@code pipelineCache} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code pipelineCache} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code pipelineCache} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code pipelineCache} must be a valid {@code VkPipelineCache} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code pipelineCache} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code pipelineCache} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the pipeline cache object. * @param pipelineCache the handle of the pipeline cache to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyPipelineCache(VkDevice device, @NativeType("VkPipelineCache") long pipelineCache, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyPipelineCache(device, pipelineCache, memAddressSafe(pAllocator)); } // --- [ vkGetPipelineCacheData ] --- /** * Unsafe version of: {@link #vkGetPipelineCacheData GetPipelineCacheData} * * @param pDataSize a pointer to a {@code size_t} value related to the amount of data in the pipeline cache, as described below. */ public static int nvkGetPipelineCacheData(VkDevice device, long pipelineCache, long pDataSize, long pData) { long __functionAddress = device.getCapabilities().vkGetPipelineCacheData; return callPJPPI(device.address(), pipelineCache, pDataSize, pData, __functionAddress); } /** * Get the data store from a pipeline cache. * *
C Specification
* *

Data can be retrieved from a pipeline cache object using the command:

* *

     * VkResult vkGetPipelineCacheData(
     *     VkDevice                                    device,
     *     VkPipelineCache                             pipelineCache,
     *     size_t*                                     pDataSize,
     *     void*                                       pData);
* *
Description
* *

If {@code pData} is {@code NULL}, then the maximum size of the data that can be retrieved from the pipeline cache, in bytes, is returned in {@code pDataSize}. Otherwise, {@code pDataSize} must point to a variable set by the user to the size of the buffer, in bytes, pointed to by {@code pData}, and on return the variable is overwritten with the amount of data actually written to {@code pData}. If {@code pDataSize} is less than the maximum size that can be retrieved by the pipeline cache, at most {@code pDataSize} bytes will be written to {@code pData}, and {@link #VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link #VK_SUCCESS SUCCESS}, to indicate that not all of the pipeline cache was returned.

* *

Any data written to {@code pData} is valid and can be provided as the {@code pInitialData} member of the {@link VkPipelineCacheCreateInfo} structure passed to {@code vkCreatePipelineCache}.

* *

Two calls to {@code vkGetPipelineCacheData} with the same parameters must retrieve the same data unless a command that modifies the contents of the cache is called between them.

* *

The initial bytes written to {@code pData} must be a header as described in the Pipeline Cache Header section.

* *

If {@code pDataSize} is less than what is necessary to store this header, nothing will be written to {@code pData} and zero will be written to {@code pDataSize}.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pipelineCache} must be a valid {@code VkPipelineCache} handle
  • *
  • {@code pDataSize} must be a valid pointer to a {@code size_t} value
  • *
  • If the value referenced by {@code pDataSize} is not 0, and {@code pData} is not {@code NULL}, {@code pData} must be a valid pointer to an array of {@code pDataSize} bytes
  • *
  • {@code pipelineCache} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link #VK_INCOMPLETE INCOMPLETE}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param device the logical device that owns the pipeline cache. * @param pipelineCache the pipeline cache to retrieve data from. * @param pDataSize a pointer to a {@code size_t} value related to the amount of data in the pipeline cache, as described below. * @param pData either {@code NULL} or a pointer to a buffer. */ @NativeType("VkResult") public static int vkGetPipelineCacheData(VkDevice device, @NativeType("VkPipelineCache") long pipelineCache, @NativeType("size_t *") PointerBuffer pDataSize, @Nullable @NativeType("void *") ByteBuffer pData) { if (CHECKS) { check(pDataSize, 1); checkSafe(pData, pDataSize.get(pDataSize.position())); } return nvkGetPipelineCacheData(device, pipelineCache, memAddress(pDataSize), memAddressSafe(pData)); } // --- [ vkMergePipelineCaches ] --- /** * Unsafe version of: {@link #vkMergePipelineCaches MergePipelineCaches} * * @param srcCacheCount the length of the {@code pSrcCaches} array. */ public static int nvkMergePipelineCaches(VkDevice device, long dstCache, int srcCacheCount, long pSrcCaches) { long __functionAddress = device.getCapabilities().vkMergePipelineCaches; return callPJPI(device.address(), dstCache, srcCacheCount, pSrcCaches, __functionAddress); } /** * Combine the data stores of pipeline caches. * *
C Specification
* *

Pipeline cache objects can be merged using the command:

* *

     * VkResult vkMergePipelineCaches(
     *     VkDevice                                    device,
     *     VkPipelineCache                             dstCache,
     *     uint32_t                                    srcCacheCount,
     *     const VkPipelineCache*                      pSrcCaches);
* *
Description
* *
Note
* *

The details of the merge operation are implementation-dependent, but implementations should merge the contents of the specified pipelines and prune duplicate entries.

*
* *
Valid Usage
* *
    *
  • {@code dstCache} must not appear in the list of source caches
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code dstCache} must be a valid {@code VkPipelineCache} handle
  • *
  • {@code pSrcCaches} must be a valid pointer to an array of {@code srcCacheCount} valid {@code VkPipelineCache} handles
  • *
  • {@code srcCacheCount} must be greater than 0
  • *
  • {@code dstCache} must have been created, allocated, or retrieved from {@code device}
  • *
  • Each element of {@code pSrcCaches} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code dstCache} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param device the logical device that owns the pipeline cache objects. * @param dstCache the handle of the pipeline cache to merge results into. * @param pSrcCaches a pointer to an array of pipeline cache handles, which will be merged into {@code dstCache}. The previous contents of {@code dstCache} are included after the merge. */ @NativeType("VkResult") public static int vkMergePipelineCaches(VkDevice device, @NativeType("VkPipelineCache") long dstCache, @NativeType("VkPipelineCache const *") LongBuffer pSrcCaches) { return nvkMergePipelineCaches(device, dstCache, pSrcCaches.remaining(), memAddress(pSrcCaches)); } // --- [ vkCreateGraphicsPipelines ] --- /** * Unsafe version of: {@link #vkCreateGraphicsPipelines CreateGraphicsPipelines} * * @param createInfoCount the length of the {@code pCreateInfos} and {@code pPipelines} arrays. */ public static int nvkCreateGraphicsPipelines(VkDevice device, long pipelineCache, int createInfoCount, long pCreateInfos, long pAllocator, long pPipelines) { long __functionAddress = device.getCapabilities().vkCreateGraphicsPipelines; if (CHECKS) { Struct.validate(pCreateInfos, createInfoCount, VkGraphicsPipelineCreateInfo.SIZEOF, VkGraphicsPipelineCreateInfo::validate); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPJPPPI(device.address(), pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, __functionAddress); } /** * Create graphics pipelines. * *
C Specification
* *

To create graphics pipelines, call:

* *

     * VkResult vkCreateGraphicsPipelines(
     *     VkDevice                                    device,
     *     VkPipelineCache                             pipelineCache,
     *     uint32_t                                    createInfoCount,
     *     const VkGraphicsPipelineCreateInfo*         pCreateInfos,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkPipeline*                                 pPipelines);
* *
Description
* *

The {@link VkGraphicsPipelineCreateInfo} structure includes an array of {@link VkPipelineShaderStageCreateInfo} structures for each of the desired active shader stages, as well as creation information for all relevant fixed-function stages, and a pipeline layout.

* *
Valid Usage
* *
    *
  • If the {@code flags} member of any element of {@code pCreateInfos} contains the {@link #VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT} flag, and the {@code basePipelineIndex} member of that same element is not {@code -1}, {@code basePipelineIndex} must be less than the index into {@code pCreateInfos} that corresponds to that element
  • *
  • If the {@code flags} member of any element of {@code pCreateInfos} contains the {@link #VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT} flag, the base pipeline must have been created with the {@link #VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT} flag set
  • *
  • If {@code pipelineCache} was created with {@link EXTPipelineCreationCacheControl#VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT}, host access to {@code pipelineCache} must be externally synchronized
  • *
* *
Note
* *

An implicit cache may be provided by the implementation or a layer. For this reason, it is still valid to set {@link EXTPipelineCreationCacheControl#VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT} on {@code flags} for any element of {@code pCreateInfos} while passing {@link #VK_NULL_HANDLE NULL_HANDLE} for {@code pipelineCache}.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code pipelineCache} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code pipelineCache} must be a valid {@code VkPipelineCache} handle
  • *
  • {@code pCreateInfos} must be a valid pointer to an array of {@code createInfoCount} valid {@link VkGraphicsPipelineCreateInfo} structures
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pPipelines} must be a valid pointer to an array of {@code createInfoCount} {@code VkPipeline} handles
  • *
  • {@code createInfoCount} must be greater than 0
  • *
  • If {@code pipelineCache} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link EXTPipelineCreationCacheControl#VK_PIPELINE_COMPILE_REQUIRED_EXT PIPELINE_COMPILE_REQUIRED_EXT}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link NVGLSLShader#VK_ERROR_INVALID_SHADER_NV ERROR_INVALID_SHADER_NV}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkGraphicsPipelineCreateInfo}

* * @param device the logical device that creates the graphics pipelines. * @param pipelineCache either {@link #VK_NULL_HANDLE NULL_HANDLE}, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command. * @param pCreateInfos a pointer to an array of {@link VkGraphicsPipelineCreateInfo} structures. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pPipelines a pointer to an array of {@code VkPipeline} handles in which the resulting graphics pipeline objects are returned. */ @NativeType("VkResult") public static int vkCreateGraphicsPipelines(VkDevice device, @NativeType("VkPipelineCache") long pipelineCache, @NativeType("VkGraphicsPipelineCreateInfo const *") VkGraphicsPipelineCreateInfo.Buffer pCreateInfos, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPipeline *") LongBuffer pPipelines) { if (CHECKS) { check(pPipelines, pCreateInfos.remaining()); } return nvkCreateGraphicsPipelines(device, pipelineCache, pCreateInfos.remaining(), pCreateInfos.address(), memAddressSafe(pAllocator), memAddress(pPipelines)); } // --- [ vkCreateComputePipelines ] --- /** * Unsafe version of: {@link #vkCreateComputePipelines CreateComputePipelines} * * @param createInfoCount the length of the {@code pCreateInfos} and {@code pPipelines} arrays. */ public static int nvkCreateComputePipelines(VkDevice device, long pipelineCache, int createInfoCount, long pCreateInfos, long pAllocator, long pPipelines) { long __functionAddress = device.getCapabilities().vkCreateComputePipelines; if (CHECKS) { Struct.validate(pCreateInfos, createInfoCount, VkComputePipelineCreateInfo.SIZEOF, VkComputePipelineCreateInfo::validate); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPJPPPI(device.address(), pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, __functionAddress); } /** * Creates a new compute pipeline object. * *
C Specification
* *

To create compute pipelines, call:

* *

     * VkResult vkCreateComputePipelines(
     *     VkDevice                                    device,
     *     VkPipelineCache                             pipelineCache,
     *     uint32_t                                    createInfoCount,
     *     const VkComputePipelineCreateInfo*          pCreateInfos,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkPipeline*                                 pPipelines);
* *
Valid Usage
* *
    *
  • If the {@code flags} member of any element of {@code pCreateInfos} contains the {@link #VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT} flag, and the {@code basePipelineIndex} member of that same element is not {@code -1}, {@code basePipelineIndex} must be less than the index into {@code pCreateInfos} that corresponds to that element
  • *
  • If the {@code flags} member of any element of {@code pCreateInfos} contains the {@link #VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT} flag, the base pipeline must have been created with the {@link #VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT} flag set
  • *
  • If {@code pipelineCache} was created with {@link EXTPipelineCreationCacheControl#VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT}, host access to {@code pipelineCache} must be externally synchronized
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code pipelineCache} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code pipelineCache} must be a valid {@code VkPipelineCache} handle
  • *
  • {@code pCreateInfos} must be a valid pointer to an array of {@code createInfoCount} valid {@link VkComputePipelineCreateInfo} structures
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pPipelines} must be a valid pointer to an array of {@code createInfoCount} {@code VkPipeline} handles
  • *
  • {@code createInfoCount} must be greater than 0
  • *
  • If {@code pipelineCache} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
  • {@link EXTPipelineCreationCacheControl#VK_PIPELINE_COMPILE_REQUIRED_EXT PIPELINE_COMPILE_REQUIRED_EXT}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link NVGLSLShader#VK_ERROR_INVALID_SHADER_NV ERROR_INVALID_SHADER_NV}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkComputePipelineCreateInfo}

* * @param device the logical device that creates the compute pipelines. * @param pipelineCache either {@link #VK_NULL_HANDLE NULL_HANDLE}, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command. * @param pCreateInfos a pointer to an array of {@link VkComputePipelineCreateInfo} structures. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pPipelines a pointer to an array of {@code VkPipeline} handles in which the resulting compute pipeline objects are returned. */ @NativeType("VkResult") public static int vkCreateComputePipelines(VkDevice device, @NativeType("VkPipelineCache") long pipelineCache, @NativeType("VkComputePipelineCreateInfo const *") VkComputePipelineCreateInfo.Buffer pCreateInfos, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPipeline *") LongBuffer pPipelines) { if (CHECKS) { check(pPipelines, pCreateInfos.remaining()); } return nvkCreateComputePipelines(device, pipelineCache, pCreateInfos.remaining(), pCreateInfos.address(), memAddressSafe(pAllocator), memAddress(pPipelines)); } // --- [ vkDestroyPipeline ] --- /** Unsafe version of: {@link #vkDestroyPipeline DestroyPipeline} */ public static void nvkDestroyPipeline(VkDevice device, long pipeline, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyPipeline; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), pipeline, pAllocator, __functionAddress); } /** * Destroy a pipeline object. * *
C Specification
* *

To destroy a pipeline, call:

* *

     * void vkDestroyPipeline(
     *     VkDevice                                    device,
     *     VkPipeline                                  pipeline,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code pipeline} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code pipeline} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code pipeline} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code pipeline} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code pipeline} must be a valid {@code VkPipeline} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code pipeline} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code pipeline} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the pipeline. * @param pipeline the handle of the pipeline to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyPipeline(VkDevice device, @NativeType("VkPipeline") long pipeline, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyPipeline(device, pipeline, memAddressSafe(pAllocator)); } // --- [ vkCreatePipelineLayout ] --- /** Unsafe version of: {@link #vkCreatePipelineLayout CreatePipelineLayout} */ public static int nvkCreatePipelineLayout(VkDevice device, long pCreateInfo, long pAllocator, long pPipelineLayout) { long __functionAddress = device.getCapabilities().vkCreatePipelineLayout; if (CHECKS) { VkPipelineLayoutCreateInfo.validate(pCreateInfo); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pPipelineLayout, __functionAddress); } /** * Creates a new pipeline layout object. * *
C Specification
* *

To create a pipeline layout, call:

* *

     * VkResult vkCreatePipelineLayout(
     *     VkDevice                                    device,
     *     const VkPipelineLayoutCreateInfo*           pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkPipelineLayout*                           pPipelineLayout);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkPipelineLayoutCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pPipelineLayout} must be a valid pointer to a {@code VkPipelineLayout} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkPipelineLayoutCreateInfo}

* * @param device the logical device that creates the pipeline layout. * @param pCreateInfo a pointer to a {@link VkPipelineLayoutCreateInfo} structure specifying the state of the pipeline layout object. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pPipelineLayout a pointer to a {@code VkPipelineLayout} handle in which the resulting pipeline layout object is returned. */ @NativeType("VkResult") public static int vkCreatePipelineLayout(VkDevice device, @NativeType("VkPipelineLayoutCreateInfo const *") VkPipelineLayoutCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPipelineLayout *") LongBuffer pPipelineLayout) { if (CHECKS) { check(pPipelineLayout, 1); } return nvkCreatePipelineLayout(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pPipelineLayout)); } // --- [ vkDestroyPipelineLayout ] --- /** Unsafe version of: {@link #vkDestroyPipelineLayout DestroyPipelineLayout} */ public static void nvkDestroyPipelineLayout(VkDevice device, long pipelineLayout, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyPipelineLayout; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), pipelineLayout, pAllocator, __functionAddress); } /** * Destroy a pipeline layout object. * *
C Specification
* *

To destroy a pipeline layout, call:

* *

     * void vkDestroyPipelineLayout(
     *     VkDevice                                    device,
     *     VkPipelineLayout                            pipelineLayout,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • If {@link VkAllocationCallbacks} were provided when {@code pipelineLayout} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code pipelineLayout} was created, {@code pAllocator} must be {@code NULL}
  • *
  • {@code pipelineLayout} must not have been passed to any {@code vkCmd*} command for any command buffers that are still in the recording state when {@code vkDestroyPipelineLayout} is called
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code pipelineLayout} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code pipelineLayout} must be a valid {@code VkPipelineLayout} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code pipelineLayout} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code pipelineLayout} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the pipeline layout. * @param pipelineLayout the pipeline layout to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyPipelineLayout(VkDevice device, @NativeType("VkPipelineLayout") long pipelineLayout, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyPipelineLayout(device, pipelineLayout, memAddressSafe(pAllocator)); } // --- [ vkCreateSampler ] --- /** Unsafe version of: {@link #vkCreateSampler CreateSampler} */ public static int nvkCreateSampler(VkDevice device, long pCreateInfo, long pAllocator, long pSampler) { long __functionAddress = device.getCapabilities().vkCreateSampler; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pSampler, __functionAddress); } /** * Create a new sampler object. * *
C Specification
* *

To create a sampler object, call:

* *

     * VkResult vkCreateSampler(
     *     VkDevice                                    device,
     *     const VkSamplerCreateInfo*                  pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkSampler*                                  pSampler);
* *
Valid Usage
* *
    *
  • There must be less than {@link VkPhysicalDeviceLimits}{@code ::maxSamplerAllocationCount} {@code VkSampler} objects currently created on the device
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkSamplerCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pSampler} must be a valid pointer to a {@code VkSampler} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkSamplerCreateInfo}

* * @param device the logical device that creates the sampler. * @param pCreateInfo a pointer to a {@link VkSamplerCreateInfo} structure specifying the state of the sampler object. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pSampler a pointer to a {@code VkSampler} handle in which the resulting sampler object is returned. */ @NativeType("VkResult") public static int vkCreateSampler(VkDevice device, @NativeType("VkSamplerCreateInfo const *") VkSamplerCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSampler *") LongBuffer pSampler) { if (CHECKS) { check(pSampler, 1); } return nvkCreateSampler(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pSampler)); } // --- [ vkDestroySampler ] --- /** Unsafe version of: {@link #vkDestroySampler DestroySampler} */ public static void nvkDestroySampler(VkDevice device, long sampler, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroySampler; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), sampler, pAllocator, __functionAddress); } /** * Destroy a sampler object. * *
C Specification
* *

To destroy a sampler, call:

* *

     * void vkDestroySampler(
     *     VkDevice                                    device,
     *     VkSampler                                   sampler,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code sampler} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code sampler} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code sampler} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code sampler} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code sampler} must be a valid {@code VkSampler} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code sampler} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code sampler} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the sampler. * @param sampler the sampler to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroySampler(VkDevice device, @NativeType("VkSampler") long sampler, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroySampler(device, sampler, memAddressSafe(pAllocator)); } // --- [ vkCreateDescriptorSetLayout ] --- /** Unsafe version of: {@link #vkCreateDescriptorSetLayout CreateDescriptorSetLayout} */ public static int nvkCreateDescriptorSetLayout(VkDevice device, long pCreateInfo, long pAllocator, long pSetLayout) { long __functionAddress = device.getCapabilities().vkCreateDescriptorSetLayout; if (CHECKS) { VkDescriptorSetLayoutCreateInfo.validate(pCreateInfo); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pSetLayout, __functionAddress); } /** * Create a new descriptor set layout. * *
C Specification
* *

To create descriptor set layout objects, call:

* *

     * VkResult vkCreateDescriptorSetLayout(
     *     VkDevice                                    device,
     *     const VkDescriptorSetLayoutCreateInfo*      pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkDescriptorSetLayout*                      pSetLayout);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkDescriptorSetLayoutCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pSetLayout} must be a valid pointer to a {@code VkDescriptorSetLayout} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkDescriptorSetLayoutCreateInfo}

* * @param device the logical device that creates the descriptor set layout. * @param pCreateInfo a pointer to a {@link VkDescriptorSetLayoutCreateInfo} structure specifying the state of the descriptor set layout object. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pSetLayout a pointer to a {@code VkDescriptorSetLayout} handle in which the resulting descriptor set layout object is returned. */ @NativeType("VkResult") public static int vkCreateDescriptorSetLayout(VkDevice device, @NativeType("VkDescriptorSetLayoutCreateInfo const *") VkDescriptorSetLayoutCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkDescriptorSetLayout *") LongBuffer pSetLayout) { if (CHECKS) { check(pSetLayout, 1); } return nvkCreateDescriptorSetLayout(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pSetLayout)); } // --- [ vkDestroyDescriptorSetLayout ] --- /** Unsafe version of: {@link #vkDestroyDescriptorSetLayout DestroyDescriptorSetLayout} */ public static void nvkDestroyDescriptorSetLayout(VkDevice device, long descriptorSetLayout, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyDescriptorSetLayout; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), descriptorSetLayout, pAllocator, __functionAddress); } /** * Destroy a descriptor set layout object. * *
C Specification
* *

To destroy a descriptor set layout, call:

* *

     * void vkDestroyDescriptorSetLayout(
     *     VkDevice                                    device,
     *     VkDescriptorSetLayout                       descriptorSetLayout,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • If {@link VkAllocationCallbacks} were provided when {@code descriptorSetLayout} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code descriptorSetLayout} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code descriptorSetLayout} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code descriptorSetLayout} must be a valid {@code VkDescriptorSetLayout} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code descriptorSetLayout} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code descriptorSetLayout} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the descriptor set layout. * @param descriptorSetLayout the descriptor set layout to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyDescriptorSetLayout(VkDevice device, @NativeType("VkDescriptorSetLayout") long descriptorSetLayout, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyDescriptorSetLayout(device, descriptorSetLayout, memAddressSafe(pAllocator)); } // --- [ vkCreateDescriptorPool ] --- /** Unsafe version of: {@link #vkCreateDescriptorPool CreateDescriptorPool} */ public static int nvkCreateDescriptorPool(VkDevice device, long pCreateInfo, long pAllocator, long pDescriptorPool) { long __functionAddress = device.getCapabilities().vkCreateDescriptorPool; if (CHECKS) { VkDescriptorPoolCreateInfo.validate(pCreateInfo); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pDescriptorPool, __functionAddress); } /** * Creates a descriptor pool object. * *
C Specification
* *

To create a descriptor pool object, call:

* *

     * VkResult vkCreateDescriptorPool(
     *     VkDevice                                    device,
     *     const VkDescriptorPoolCreateInfo*           pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkDescriptorPool*                           pDescriptorPool);
* *
Description
* *

The created descriptor pool is returned in {@code pDescriptorPool}.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkDescriptorPoolCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pDescriptorPool} must be a valid pointer to a {@code VkDescriptorPool} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link EXTDescriptorIndexing#VK_ERROR_FRAGMENTATION_EXT ERROR_FRAGMENTATION_EXT}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkDescriptorPoolCreateInfo}

* * @param device the logical device that creates the descriptor pool. * @param pCreateInfo a pointer to a {@link VkDescriptorPoolCreateInfo} structure specifying the state of the descriptor pool object. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pDescriptorPool a pointer to a {@code VkDescriptorPool} handle in which the resulting descriptor pool object is returned. */ @NativeType("VkResult") public static int vkCreateDescriptorPool(VkDevice device, @NativeType("VkDescriptorPoolCreateInfo const *") VkDescriptorPoolCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkDescriptorPool *") LongBuffer pDescriptorPool) { if (CHECKS) { check(pDescriptorPool, 1); } return nvkCreateDescriptorPool(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pDescriptorPool)); } // --- [ vkDestroyDescriptorPool ] --- /** Unsafe version of: {@link #vkDestroyDescriptorPool DestroyDescriptorPool} */ public static void nvkDestroyDescriptorPool(VkDevice device, long descriptorPool, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyDescriptorPool; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), descriptorPool, pAllocator, __functionAddress); } /** * Destroy a descriptor pool object. * *
C Specification
* *

To destroy a descriptor pool, call:

* *

     * void vkDestroyDescriptorPool(
     *     VkDevice                                    device,
     *     VkDescriptorPool                            descriptorPool,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Description
* *

When a pool is destroyed, all descriptor sets allocated from the pool are implicitly freed and become invalid. Descriptor sets allocated from a given pool do not need to be freed before destroying that descriptor pool.

* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code descriptorPool} (via any allocated descriptor sets) must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code descriptorPool} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code descriptorPool} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code descriptorPool} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code descriptorPool} must be a valid {@code VkDescriptorPool} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code descriptorPool} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code descriptorPool} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the descriptor pool. * @param descriptorPool the descriptor pool to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyDescriptorPool(VkDevice device, @NativeType("VkDescriptorPool") long descriptorPool, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyDescriptorPool(device, descriptorPool, memAddressSafe(pAllocator)); } // --- [ vkResetDescriptorPool ] --- /** * Resets a descriptor pool object. * *
C Specification
* *

To return all descriptor sets allocated from a given pool to the pool, rather than freeing individual descriptor sets, call:

* *

     * VkResult vkResetDescriptorPool(
     *     VkDevice                                    device,
     *     VkDescriptorPool                            descriptorPool,
     *     VkDescriptorPoolResetFlags                  flags);
* *
Description
* *

Resetting a descriptor pool recycles all of the resources from all of the descriptor sets allocated from the descriptor pool back to the descriptor pool, and the descriptor sets are implicitly freed.

* *
Valid Usage
* *
    *
  • All uses of {@code descriptorPool} (via any allocated descriptor sets) must have completed execution
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code descriptorPool} must be a valid {@code VkDescriptorPool} handle
  • *
  • {@code flags} must be 0
  • *
  • {@code descriptorPool} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code descriptorPool} must be externally synchronized
  • *
  • Host access to any {@code VkDescriptorSet} objects allocated from {@code descriptorPool} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
* * @param device the logical device that owns the descriptor pool. * @param descriptorPool the descriptor pool to be reset. * @param flags reserved for future use. */ @NativeType("VkResult") public static int vkResetDescriptorPool(VkDevice device, @NativeType("VkDescriptorPool") long descriptorPool, @NativeType("VkDescriptorPoolResetFlags") int flags) { long __functionAddress = device.getCapabilities().vkResetDescriptorPool; return callPJI(device.address(), descriptorPool, flags, __functionAddress); } // --- [ vkAllocateDescriptorSets ] --- /** Unsafe version of: {@link #vkAllocateDescriptorSets AllocateDescriptorSets} */ public static int nvkAllocateDescriptorSets(VkDevice device, long pAllocateInfo, long pDescriptorSets) { long __functionAddress = device.getCapabilities().vkAllocateDescriptorSets; if (CHECKS) { VkDescriptorSetAllocateInfo.validate(pAllocateInfo); } return callPPPI(device.address(), pAllocateInfo, pDescriptorSets, __functionAddress); } /** * Allocate one or more descriptor sets. * *
C Specification
* *

To allocate descriptor sets from a descriptor pool, call:

* *

     * VkResult vkAllocateDescriptorSets(
     *     VkDevice                                    device,
     *     const VkDescriptorSetAllocateInfo*          pAllocateInfo,
     *     VkDescriptorSet*                            pDescriptorSets);
* *
Description
* *

The allocated descriptor sets are returned in {@code pDescriptorSets}.

* *

When a descriptor set is allocated, the initial state is largely uninitialized and all descriptors are undefined. Descriptors also become undefined if the underlying resource is destroyed. Descriptor sets containing undefined descriptors can still be bound and used, subject to the following conditions:

* *
    *
  • For descriptor set bindings created with the {@link VK12#VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT} bit set, all descriptors in that binding that are dynamically used must have been populated before the descriptor set is consumed.
  • *
  • For descriptor set bindings created without the {@link VK12#VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT} bit set, all descriptors in that binding that are statically used must have been populated before the descriptor set is consumed.
  • *
  • Descriptor bindings with descriptor type of {@link EXTInlineUniformBlock#VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT} can be undefined when the descriptor set is consumed; though values in that block will be undefined.
  • *
  • Entries that are not used by a pipeline can have undefined descriptors.
  • *
* *

If a call to {@code vkAllocateDescriptorSets} would cause the total number of descriptor sets allocated from the pool to exceed the value of {@link VkDescriptorPoolCreateInfo}{@code ::maxSets} used to create {@code pAllocateInfo→descriptorPool}, then the allocation may fail due to lack of space in the descriptor pool. Similarly, the allocation may fail due to lack of space if the call to {@code vkAllocateDescriptorSets} would cause the number of any given descriptor type to exceed the sum of all the {@code descriptorCount} members of each element of {@link VkDescriptorPoolCreateInfo}{@code ::pPoolSizes} with a {@code type} equal to that type.

* *

Additionally, the allocation may also fail if a call to {@code vkAllocateDescriptorSets} would cause the total number of inline uniform block bindings allocated from the pool to exceed the value of {@link VkDescriptorPoolInlineUniformBlockCreateInfoEXT}{@code ::maxInlineUniformBlockBindings} used to create the descriptor pool.

* *

If the allocation fails due to no more space in the descriptor pool, and not because of system or device memory exhaustion, then {@link VK11#VK_ERROR_OUT_OF_POOL_MEMORY ERROR_OUT_OF_POOL_MEMORY} must be returned.

* *

{@code vkAllocateDescriptorSets} can be used to create multiple descriptor sets. If the creation of any of those descriptor sets fails, then the implementation must destroy all successfully created descriptor set objects from this command, set all entries of the {@code pDescriptorSets} array to {@link #VK_NULL_HANDLE NULL_HANDLE} and return the error.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pAllocateInfo} must be a valid pointer to a valid {@link VkDescriptorSetAllocateInfo} structure
  • *
  • {@code pDescriptorSets} must be a valid pointer to an array of {@code pAllocateInfo→descriptorSetCount} {@code VkDescriptorSet} handles
  • *
  • {@code pAllocateInfo→descriptorSetCount} must be greater than 0
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code pAllocateInfo→descriptorPool} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link #VK_ERROR_FRAGMENTED_POOL ERROR_FRAGMENTED_POOL}
  • *
  • {@link VK11#VK_ERROR_OUT_OF_POOL_MEMORY ERROR_OUT_OF_POOL_MEMORY}
  • *
*
* *
See Also
* *

{@link VkDescriptorSetAllocateInfo}

* * @param device the logical device that owns the descriptor pool. * @param pAllocateInfo a pointer to a {@link VkDescriptorSetAllocateInfo} structure describing parameters of the allocation. * @param pDescriptorSets a pointer to an array of {@code VkDescriptorSet} handles in which the resulting descriptor set objects are returned. */ @NativeType("VkResult") public static int vkAllocateDescriptorSets(VkDevice device, @NativeType("VkDescriptorSetAllocateInfo const *") VkDescriptorSetAllocateInfo pAllocateInfo, @NativeType("VkDescriptorSet *") LongBuffer pDescriptorSets) { if (CHECKS) { check(pDescriptorSets, pAllocateInfo.descriptorSetCount()); } return nvkAllocateDescriptorSets(device, pAllocateInfo.address(), memAddress(pDescriptorSets)); } // --- [ vkFreeDescriptorSets ] --- /** * Unsafe version of: {@link #vkFreeDescriptorSets FreeDescriptorSets} * * @param descriptorSetCount the number of elements in the {@code pDescriptorSets} array. */ public static int nvkFreeDescriptorSets(VkDevice device, long descriptorPool, int descriptorSetCount, long pDescriptorSets) { long __functionAddress = device.getCapabilities().vkFreeDescriptorSets; return callPJPI(device.address(), descriptorPool, descriptorSetCount, pDescriptorSets, __functionAddress); } /** * Free one or more descriptor sets. * *
C Specification
* *

To free allocated descriptor sets, call:

* *

     * VkResult vkFreeDescriptorSets(
     *     VkDevice                                    device,
     *     VkDescriptorPool                            descriptorPool,
     *     uint32_t                                    descriptorSetCount,
     *     const VkDescriptorSet*                      pDescriptorSets);
* *
Description
* *

After calling {@code vkFreeDescriptorSets}, all descriptor sets in {@code pDescriptorSets} are invalid.

* *
Valid Usage
* *
    *
  • All submitted commands that refer to any element of {@code pDescriptorSets} must have completed execution
  • *
  • {@code pDescriptorSets} must be a valid pointer to an array of {@code descriptorSetCount} {@code VkDescriptorSet} handles, each element of which must either be a valid handle or {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
  • {@code descriptorPool} must have been created with the {@link #VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT} flag
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code descriptorPool} must be a valid {@code VkDescriptorPool} handle
  • *
  • {@code descriptorSetCount} must be greater than 0
  • *
  • {@code descriptorPool} must have been created, allocated, or retrieved from {@code device}
  • *
  • Each element of {@code pDescriptorSets} that is a valid handle must have been created, allocated, or retrieved from {@code descriptorPool}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code descriptorPool} must be externally synchronized
  • *
  • Host access to each member of {@code pDescriptorSets} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
* * @param device the logical device that owns the descriptor pool. * @param descriptorPool the descriptor pool from which the descriptor sets were allocated. * @param pDescriptorSets a pointer to an array of handles to {@code VkDescriptorSet} objects. */ @NativeType("VkResult") public static int vkFreeDescriptorSets(VkDevice device, @NativeType("VkDescriptorPool") long descriptorPool, @NativeType("VkDescriptorSet const *") LongBuffer pDescriptorSets) { return nvkFreeDescriptorSets(device, descriptorPool, pDescriptorSets.remaining(), memAddress(pDescriptorSets)); } /** * Free one or more descriptor sets. * *
C Specification
* *

To free allocated descriptor sets, call:

* *

     * VkResult vkFreeDescriptorSets(
     *     VkDevice                                    device,
     *     VkDescriptorPool                            descriptorPool,
     *     uint32_t                                    descriptorSetCount,
     *     const VkDescriptorSet*                      pDescriptorSets);
* *
Description
* *

After calling {@code vkFreeDescriptorSets}, all descriptor sets in {@code pDescriptorSets} are invalid.

* *
Valid Usage
* *
    *
  • All submitted commands that refer to any element of {@code pDescriptorSets} must have completed execution
  • *
  • {@code pDescriptorSets} must be a valid pointer to an array of {@code descriptorSetCount} {@code VkDescriptorSet} handles, each element of which must either be a valid handle or {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
  • {@code descriptorPool} must have been created with the {@link #VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT} flag
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code descriptorPool} must be a valid {@code VkDescriptorPool} handle
  • *
  • {@code descriptorSetCount} must be greater than 0
  • *
  • {@code descriptorPool} must have been created, allocated, or retrieved from {@code device}
  • *
  • Each element of {@code pDescriptorSets} that is a valid handle must have been created, allocated, or retrieved from {@code descriptorPool}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code descriptorPool} must be externally synchronized
  • *
  • Host access to each member of {@code pDescriptorSets} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
* * @param device the logical device that owns the descriptor pool. * @param descriptorPool the descriptor pool from which the descriptor sets were allocated. */ @NativeType("VkResult") public static int vkFreeDescriptorSets(VkDevice device, @NativeType("VkDescriptorPool") long descriptorPool, @NativeType("VkDescriptorSet const *") long pDescriptorSet) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { LongBuffer pDescriptorSets = stack.longs(pDescriptorSet); return nvkFreeDescriptorSets(device, descriptorPool, 1, memAddress(pDescriptorSets)); } finally { stack.setPointer(stackPointer); } } // --- [ vkUpdateDescriptorSets ] --- /** * Unsafe version of: {@link #vkUpdateDescriptorSets UpdateDescriptorSets} * * @param descriptorWriteCount the number of elements in the {@code pDescriptorWrites} array. * @param descriptorCopyCount the number of elements in the {@code pDescriptorCopies} array. */ public static void nvkUpdateDescriptorSets(VkDevice device, int descriptorWriteCount, long pDescriptorWrites, int descriptorCopyCount, long pDescriptorCopies) { long __functionAddress = device.getCapabilities().vkUpdateDescriptorSets; callPPPV(device.address(), descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies, __functionAddress); } /** * Update the contents of a descriptor set object. * *
C Specification
* *

Once allocated, descriptor sets can be updated with a combination of write and copy operations. To update descriptor sets, call:

* *

     * void vkUpdateDescriptorSets(
     *     VkDevice                                    device,
     *     uint32_t                                    descriptorWriteCount,
     *     const VkWriteDescriptorSet*                 pDescriptorWrites,
     *     uint32_t                                    descriptorCopyCount,
     *     const VkCopyDescriptorSet*                  pDescriptorCopies);
* *
Description
* *

The operations described by {@code pDescriptorWrites} are performed first, followed by the operations described by {@code pDescriptorCopies}. Within each array, the operations are performed in the order they appear in the array.

* *

Each element in the {@code pDescriptorWrites} array describes an operation updating the descriptor set using descriptors for resources specified in the structure.

* *

Each element in the {@code pDescriptorCopies} array is a {@link VkCopyDescriptorSet} structure describing an operation copying descriptors between sets.

* *

If the {@code dstSet} member of any element of {@code pDescriptorWrites} or {@code pDescriptorCopies} is bound, accessed, or modified by any command that was recorded to a command buffer which is currently in the recording or executable state, and any of the descriptor bindings that are updated were not created with the {@link VK12#VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT} or {@link VK12#VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT} bits set, that command buffer becomes invalid.

* *
Valid Usage
* *
    *
  • For each element i where {@code pDescriptorWrites}[i].{@code descriptorType} is {@link #VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER} or {@link #VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER}, elements of the {@code pTexelBufferView} member of {@code pDescriptorWrites}[i] must have been created on {@code device}
  • *
  • For each element i where {@code pDescriptorWrites}[i].{@code descriptorType} is {@link #VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER DESCRIPTOR_TYPE_UNIFORM_BUFFER}, {@link #VK_DESCRIPTOR_TYPE_STORAGE_BUFFER DESCRIPTOR_TYPE_STORAGE_BUFFER}, {@link #VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC}, or {@link #VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC}, the {@code buffer} member of any element of the {@code pBufferInfo} member of {@code pDescriptorWrites}[i] must have been created on {@code device}
  • *
  • For each element i where {@code pDescriptorWrites}[i].{@code descriptorType} is {@link #VK_DESCRIPTOR_TYPE_SAMPLER DESCRIPTOR_TYPE_SAMPLER} or {@link #VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER}, and {@code dstSet} was not allocated with a layout that included immutable samplers for {@code dstBinding} with {@code descriptorType}, the {@code sampler} member of any element of the {@code pImageInfo} member of {@code pDescriptorWrites}[i] must have been created on {@code device}
  • *
  • For each element i where {@code pDescriptorWrites}[i].{@code descriptorType} is {@link #VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE DESCRIPTOR_TYPE_SAMPLED_IMAGE}, {@link #VK_DESCRIPTOR_TYPE_STORAGE_IMAGE DESCRIPTOR_TYPE_STORAGE_IMAGE}, {@link #VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT DESCRIPTOR_TYPE_INPUT_ATTACHMENT}, or {@link #VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER} the {@code imageView} member of any element of {@code pDescriptorWrites}[i] must have been created on {@code device}
  • *
  • For each element i where {@code pDescriptorWrites}[i].{@code descriptorType} is {@link KHRAccelerationStructure#VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR}, elements of the {@code pAccelerationStructures} member of a {@link VkWriteDescriptorSetAccelerationStructureKHR} structure in the {@code pNext} chain of {@code pDescriptorWrites}[i] must have been created on {@code device}
  • *
  • For each element i where {@code pDescriptorWrites}[i].{@code descriptorType} is {@link NVRayTracing#VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV}, elements of the {@code pAccelerationStructures} member of a {@link VkWriteDescriptorSetAccelerationStructureNV} structure in the {@code pNext} chain of {@code pDescriptorWrites}[i] must have been created on {@code device}
  • *
  • Descriptor bindings updated by this command which were created without the {@link VK12#VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT} or {@link VK12#VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT} bits set must not be used by any command that was recorded to a command buffer which is in the pending state
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code descriptorWriteCount} is not 0, {@code pDescriptorWrites} must be a valid pointer to an array of {@code descriptorWriteCount} valid {@link VkWriteDescriptorSet} structures
  • *
  • If {@code descriptorCopyCount} is not 0, {@code pDescriptorCopies} must be a valid pointer to an array of {@code descriptorCopyCount} valid {@link VkCopyDescriptorSet} structures
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code pDescriptorWrites}[].dstSet must be externally synchronized
  • *
  • Host access to {@code pDescriptorCopies}[].dstSet must be externally synchronized
  • *
* *
See Also
* *

{@link VkCopyDescriptorSet}, {@link VkWriteDescriptorSet}

* * @param device the logical device that updates the descriptor sets. * @param pDescriptorWrites a pointer to an array of {@link VkWriteDescriptorSet} structures describing the descriptor sets to write to. * @param pDescriptorCopies a pointer to an array of {@link VkCopyDescriptorSet} structures describing the descriptor sets to copy between. */ public static void vkUpdateDescriptorSets(VkDevice device, @Nullable @NativeType("VkWriteDescriptorSet const *") VkWriteDescriptorSet.Buffer pDescriptorWrites, @Nullable @NativeType("VkCopyDescriptorSet const *") VkCopyDescriptorSet.Buffer pDescriptorCopies) { nvkUpdateDescriptorSets(device, remainingSafe(pDescriptorWrites), memAddressSafe(pDescriptorWrites), remainingSafe(pDescriptorCopies), memAddressSafe(pDescriptorCopies)); } // --- [ vkCreateFramebuffer ] --- /** Unsafe version of: {@link #vkCreateFramebuffer CreateFramebuffer} */ public static int nvkCreateFramebuffer(VkDevice device, long pCreateInfo, long pAllocator, long pFramebuffer) { long __functionAddress = device.getCapabilities().vkCreateFramebuffer; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pFramebuffer, __functionAddress); } /** * Create a new framebuffer object. * *
C Specification
* *

To create a framebuffer, call:

* *

     * VkResult vkCreateFramebuffer(
     *     VkDevice                                    device,
     *     const VkFramebufferCreateInfo*              pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkFramebuffer*                              pFramebuffer);
* *
Valid Usage
* *
    *
  • If {@code pCreateInfo→flags} does not include {@link VK12#VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT FRAMEBUFFER_CREATE_IMAGELESS_BIT}, and {@code attachmentCount} is not 0, each element of {@code pCreateInfo→pAttachments} must have been created on {@code device}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkFramebufferCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pFramebuffer} must be a valid pointer to a {@code VkFramebuffer} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkFramebufferCreateInfo}

* * @param device the logical device that creates the framebuffer. * @param pCreateInfo a pointer to a {@link VkFramebufferCreateInfo} structure describing additional information about framebuffer creation. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pFramebuffer a pointer to a {@code VkFramebuffer} handle in which the resulting framebuffer object is returned. */ @NativeType("VkResult") public static int vkCreateFramebuffer(VkDevice device, @NativeType("VkFramebufferCreateInfo const *") VkFramebufferCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkFramebuffer *") LongBuffer pFramebuffer) { if (CHECKS) { check(pFramebuffer, 1); } return nvkCreateFramebuffer(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pFramebuffer)); } // --- [ vkDestroyFramebuffer ] --- /** Unsafe version of: {@link #vkDestroyFramebuffer DestroyFramebuffer} */ public static void nvkDestroyFramebuffer(VkDevice device, long framebuffer, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyFramebuffer; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), framebuffer, pAllocator, __functionAddress); } /** * Destroy a framebuffer object. * *
C Specification
* *

To destroy a framebuffer, call:

* *

     * void vkDestroyFramebuffer(
     *     VkDevice                                    device,
     *     VkFramebuffer                               framebuffer,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code framebuffer} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code framebuffer} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code framebuffer} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code framebuffer} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code framebuffer} must be a valid {@code VkFramebuffer} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code framebuffer} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code framebuffer} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the framebuffer. * @param framebuffer the handle of the framebuffer to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyFramebuffer(VkDevice device, @NativeType("VkFramebuffer") long framebuffer, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyFramebuffer(device, framebuffer, memAddressSafe(pAllocator)); } // --- [ vkCreateRenderPass ] --- /** Unsafe version of: {@link #vkCreateRenderPass CreateRenderPass} */ public static int nvkCreateRenderPass(VkDevice device, long pCreateInfo, long pAllocator, long pRenderPass) { long __functionAddress = device.getCapabilities().vkCreateRenderPass; if (CHECKS) { VkRenderPassCreateInfo.validate(pCreateInfo); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pRenderPass, __functionAddress); } /** * Create a new render pass object. * *
C Specification
* *

To create a render pass, call:

* *

     * VkResult vkCreateRenderPass(
     *     VkDevice                                    device,
     *     const VkRenderPassCreateInfo*               pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkRenderPass*                               pRenderPass);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkRenderPassCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pRenderPass} must be a valid pointer to a {@code VkRenderPass} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkRenderPassCreateInfo}

* * @param device the logical device that creates the render pass. * @param pCreateInfo a pointer to a {@link VkRenderPassCreateInfo} structure describing the parameters of the render pass. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pRenderPass a pointer to a {@code VkRenderPass} handle in which the resulting render pass object is returned. */ @NativeType("VkResult") public static int vkCreateRenderPass(VkDevice device, @NativeType("VkRenderPassCreateInfo const *") VkRenderPassCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkRenderPass *") LongBuffer pRenderPass) { if (CHECKS) { check(pRenderPass, 1); } return nvkCreateRenderPass(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pRenderPass)); } // --- [ vkDestroyRenderPass ] --- /** Unsafe version of: {@link #vkDestroyRenderPass DestroyRenderPass} */ public static void nvkDestroyRenderPass(VkDevice device, long renderPass, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyRenderPass; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), renderPass, pAllocator, __functionAddress); } /** * Destroy a render pass object. * *
C Specification
* *

To destroy a render pass, call:

* *

     * void vkDestroyRenderPass(
     *     VkDevice                                    device,
     *     VkRenderPass                                renderPass,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Valid Usage
* *
    *
  • All submitted commands that refer to {@code renderPass} must have completed execution
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code renderPass} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code renderPass} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code renderPass} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code renderPass} must be a valid {@code VkRenderPass} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code renderPass} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code renderPass} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the render pass. * @param renderPass the handle of the render pass to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyRenderPass(VkDevice device, @NativeType("VkRenderPass") long renderPass, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyRenderPass(device, renderPass, memAddressSafe(pAllocator)); } // --- [ vkGetRenderAreaGranularity ] --- /** Unsafe version of: {@link #vkGetRenderAreaGranularity GetRenderAreaGranularity} */ public static void nvkGetRenderAreaGranularity(VkDevice device, long renderPass, long pGranularity) { long __functionAddress = device.getCapabilities().vkGetRenderAreaGranularity; callPJPV(device.address(), renderPass, pGranularity, __functionAddress); } /** * Returns the granularity for optimal render area. * *
C Specification
* *

To query the render area granularity, call:

* *

     * void vkGetRenderAreaGranularity(
     *     VkDevice                                    device,
     *     VkRenderPass                                renderPass,
     *     VkExtent2D*                                 pGranularity);
* *
Description
* *

The conditions leading to an optimal {@code renderArea} are:

* *
    *
  • the {@code offset.x} member in {@code renderArea} is a multiple of the {@code width} member of the returned {@link VkExtent2D} (the horizontal granularity).
  • *
  • the {@code offset.y} member in {@code renderArea} is a multiple of the {@code height} member of the returned {@link VkExtent2D} (the vertical granularity).
  • *
  • either the {@code extent.width} member in {@code renderArea} is a multiple of the horizontal granularity or {@code offset.x}+{@code extent.width} is equal to the {@code width} of the {@code framebuffer} in the {@link VkRenderPassBeginInfo}.
  • *
  • either the {@code extent.height} member in {@code renderArea} is a multiple of the vertical granularity or {@code offset.y}+{@code extent.height} is equal to the {@code height} of the {@code framebuffer} in the {@link VkRenderPassBeginInfo}.
  • *
* *

Subpass dependencies are not affected by the render area, and apply to the entire image subresources attached to the framebuffer as specified in the description of automatic layout transitions. Similarly, pipeline barriers are valid even if their effect extends outside the render area.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code renderPass} must be a valid {@code VkRenderPass} handle
  • *
  • {@code pGranularity} must be a valid pointer to a {@link VkExtent2D} structure
  • *
  • {@code renderPass} must have been created, allocated, or retrieved from {@code device}
  • *
* *
See Also
* *

{@link VkExtent2D}

* * @param device the logical device that owns the render pass. * @param renderPass a handle to a render pass. * @param pGranularity a pointer to a {@link VkExtent2D} structure in which the granularity is returned. */ public static void vkGetRenderAreaGranularity(VkDevice device, @NativeType("VkRenderPass") long renderPass, @NativeType("VkExtent2D *") VkExtent2D pGranularity) { nvkGetRenderAreaGranularity(device, renderPass, pGranularity.address()); } // --- [ vkCreateCommandPool ] --- /** Unsafe version of: {@link #vkCreateCommandPool CreateCommandPool} */ public static int nvkCreateCommandPool(VkDevice device, long pCreateInfo, long pAllocator, long pCommandPool) { long __functionAddress = device.getCapabilities().vkCreateCommandPool; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(device.address(), pCreateInfo, pAllocator, pCommandPool, __functionAddress); } /** * Create a new command pool object. * *
C Specification
* *

To create a command pool, call:

* *

     * VkResult vkCreateCommandPool(
     *     VkDevice                                    device,
     *     const VkCommandPoolCreateInfo*              pCreateInfo,
     *     const VkAllocationCallbacks*                pAllocator,
     *     VkCommandPool*                              pCommandPool);
* *
Valid Usage
* *
    *
  • {@code pCreateInfo→queueFamilyIndex} must be the index of a queue family available in the logical device {@code device}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkCommandPoolCreateInfo} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pCommandPool} must be a valid pointer to a {@code VkCommandPool} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkCommandPoolCreateInfo}

* * @param device the logical device that creates the command pool. * @param pCreateInfo a pointer to a {@link VkCommandPoolCreateInfo} structure specifying the state of the command pool object. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. * @param pCommandPool a pointer to a {@code VkCommandPool} handle in which the created pool is returned. */ @NativeType("VkResult") public static int vkCreateCommandPool(VkDevice device, @NativeType("VkCommandPoolCreateInfo const *") VkCommandPoolCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkCommandPool *") LongBuffer pCommandPool) { if (CHECKS) { check(pCommandPool, 1); } return nvkCreateCommandPool(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pCommandPool)); } // --- [ vkDestroyCommandPool ] --- /** Unsafe version of: {@link #vkDestroyCommandPool DestroyCommandPool} */ public static void nvkDestroyCommandPool(VkDevice device, long commandPool, long pAllocator) { long __functionAddress = device.getCapabilities().vkDestroyCommandPool; if (CHECKS) { if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } callPJPV(device.address(), commandPool, pAllocator, __functionAddress); } /** * Destroy a command pool object. * *
C Specification
* *

To destroy a command pool, call:

* *

     * void vkDestroyCommandPool(
     *     VkDevice                                    device,
     *     VkCommandPool                               commandPool,
     *     const VkAllocationCallbacks*                pAllocator);
* *
Description
* *

When a pool is destroyed, all command buffers allocated from the pool are freed ({@code vkFreeCommandBuffers}).

* *

Any primary command buffer allocated from another {@code VkCommandPool} that is in the recording or executable state and has a secondary command buffer allocated from {@code commandPool} recorded into it, becomes invalid.

* *
Valid Usage
* *
    *
  • All {@code VkCommandBuffer} objects allocated from {@code commandPool} must not be in the pending state
  • *
  • If {@link VkAllocationCallbacks} were provided when {@code commandPool} was created, a compatible set of callbacks must be provided here
  • *
  • If no {@link VkAllocationCallbacks} were provided when {@code commandPool} was created, {@code pAllocator} must be {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • If {@code commandPool} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, {@code commandPool} must be a valid {@code VkCommandPool} handle
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • If {@code commandPool} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandPool} must be externally synchronized
  • *
* *
See Also
* *

{@link VkAllocationCallbacks}

* * @param device the logical device that destroys the command pool. * @param commandPool the handle of the command pool to destroy. * @param pAllocator controls host memory allocation as described in the Memory Allocation chapter. */ public static void vkDestroyCommandPool(VkDevice device, @NativeType("VkCommandPool") long commandPool, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) { nvkDestroyCommandPool(device, commandPool, memAddressSafe(pAllocator)); } // --- [ vkResetCommandPool ] --- /** * Reset a command pool. * *
C Specification
* *

To reset a command pool, call:

* *

     * VkResult vkResetCommandPool(
     *     VkDevice                                    device,
     *     VkCommandPool                               commandPool,
     *     VkCommandPoolResetFlags                     flags);
* *
Description
* *

Resetting a command pool recycles all of the resources from all of the command buffers allocated from the command pool back to the command pool. All command buffers that have been allocated from the command pool are put in the initial state.

* *

Any primary command buffer allocated from another {@code VkCommandPool} that is in the recording or executable state and has a secondary command buffer allocated from {@code commandPool} recorded into it, becomes invalid.

* *
Valid Usage
* *
    *
  • All {@code VkCommandBuffer} objects allocated from {@code commandPool} must not be in the pending state
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code commandPool} must be a valid {@code VkCommandPool} handle
  • *
  • {@code flags} must be a valid combination of {@code VkCommandPoolResetFlagBits} values
  • *
  • {@code commandPool} must have been created, allocated, or retrieved from {@code device}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandPool} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param device the logical device that owns the command pool. * @param commandPool the command pool to reset. * @param flags a bitmask of {@code VkCommandPoolResetFlagBits} controlling the reset operation. */ @NativeType("VkResult") public static int vkResetCommandPool(VkDevice device, @NativeType("VkCommandPool") long commandPool, @NativeType("VkCommandPoolResetFlags") int flags) { long __functionAddress = device.getCapabilities().vkResetCommandPool; return callPJI(device.address(), commandPool, flags, __functionAddress); } // --- [ vkAllocateCommandBuffers ] --- /** Unsafe version of: {@link #vkAllocateCommandBuffers AllocateCommandBuffers} */ public static int nvkAllocateCommandBuffers(VkDevice device, long pAllocateInfo, long pCommandBuffers) { long __functionAddress = device.getCapabilities().vkAllocateCommandBuffers; return callPPPI(device.address(), pAllocateInfo, pCommandBuffers, __functionAddress); } /** * Allocate command buffers from an existing command pool. * *
C Specification
* *

To allocate command buffers, call:

* *

     * VkResult vkAllocateCommandBuffers(
     *     VkDevice                                    device,
     *     const VkCommandBufferAllocateInfo*          pAllocateInfo,
     *     VkCommandBuffer*                            pCommandBuffers);
* *
Description
* *

{@code vkAllocateCommandBuffers} can be used to allocate multiple command buffers. If the allocation of any of those command buffers fails, the implementation must free all successfully allocated command buffer objects from this command, set all entries of the {@code pCommandBuffers} array to {@code NULL} and return the error.

* *
Note
* *

Filling {@code pCommandBuffers} with {@code NULL} values on failure is an exception to the default error behavior that output parameters will have undefined contents.

*
* *

When command buffers are first allocated, they are in the initial state.

* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pAllocateInfo} must be a valid pointer to a valid {@link VkCommandBufferAllocateInfo} structure
  • *
  • {@code pCommandBuffers} must be a valid pointer to an array of {@code pAllocateInfo→commandBufferCount} {@code VkCommandBuffer} handles
  • *
  • {@code pAllocateInfo→commandBufferCount} must be greater than 0
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code pAllocateInfo→commandPool} must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkCommandBufferAllocateInfo}

* * @param device the logical device that owns the command pool. * @param pAllocateInfo a pointer to a {@link VkCommandBufferAllocateInfo} structure describing parameters of the allocation. * @param pCommandBuffers a pointer to an array of {@code VkCommandBuffer} handles in which the resulting command buffer objects are returned. The array must be at least the length specified by the {@code commandBufferCount} member of {@code pAllocateInfo}. Each allocated command buffer begins in the initial state. */ @NativeType("VkResult") public static int vkAllocateCommandBuffers(VkDevice device, @NativeType("VkCommandBufferAllocateInfo const *") VkCommandBufferAllocateInfo pAllocateInfo, @NativeType("VkCommandBuffer *") PointerBuffer pCommandBuffers) { if (CHECKS) { check(pCommandBuffers, pAllocateInfo.commandBufferCount()); } return nvkAllocateCommandBuffers(device, pAllocateInfo.address(), memAddress(pCommandBuffers)); } // --- [ vkFreeCommandBuffers ] --- /** * Unsafe version of: {@link #vkFreeCommandBuffers FreeCommandBuffers} * * @param commandBufferCount the length of the {@code pCommandBuffers} array. */ public static void nvkFreeCommandBuffers(VkDevice device, long commandPool, int commandBufferCount, long pCommandBuffers) { long __functionAddress = device.getCapabilities().vkFreeCommandBuffers; callPJPV(device.address(), commandPool, commandBufferCount, pCommandBuffers, __functionAddress); } /** * Free command buffers. * *
C Specification
* *

To free command buffers, call:

* *

     * void vkFreeCommandBuffers(
     *     VkDevice                                    device,
     *     VkCommandPool                               commandPool,
     *     uint32_t                                    commandBufferCount,
     *     const VkCommandBuffer*                      pCommandBuffers);
* *
Description
* *

Any primary command buffer that is in the recording or executable state and has any element of {@code pCommandBuffers} recorded into it, becomes invalid.

* *
Valid Usage
* *
    *
  • All elements of {@code pCommandBuffers} must not be in the pending state
  • *
  • {@code pCommandBuffers} must be a valid pointer to an array of {@code commandBufferCount} {@code VkCommandBuffer} handles, each element of which must either be a valid handle or {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code commandPool} must be a valid {@code VkCommandPool} handle
  • *
  • {@code commandBufferCount} must be greater than 0
  • *
  • {@code commandPool} must have been created, allocated, or retrieved from {@code device}
  • *
  • Each element of {@code pCommandBuffers} that is a valid handle must have been created, allocated, or retrieved from {@code commandPool}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandPool} must be externally synchronized
  • *
  • Host access to each member of {@code pCommandBuffers} must be externally synchronized
  • *
* * @param device the logical device that owns the command pool. * @param commandPool the command pool from which the command buffers were allocated. * @param pCommandBuffers a pointer to an array of handles of command buffers to free. */ public static void vkFreeCommandBuffers(VkDevice device, @NativeType("VkCommandPool") long commandPool, @NativeType("VkCommandBuffer const *") PointerBuffer pCommandBuffers) { nvkFreeCommandBuffers(device, commandPool, pCommandBuffers.remaining(), memAddress(pCommandBuffers)); } /** * Free command buffers. * *
C Specification
* *

To free command buffers, call:

* *

     * void vkFreeCommandBuffers(
     *     VkDevice                                    device,
     *     VkCommandPool                               commandPool,
     *     uint32_t                                    commandBufferCount,
     *     const VkCommandBuffer*                      pCommandBuffers);
* *
Description
* *

Any primary command buffer that is in the recording or executable state and has any element of {@code pCommandBuffers} recorded into it, becomes invalid.

* *
Valid Usage
* *
    *
  • All elements of {@code pCommandBuffers} must not be in the pending state
  • *
  • {@code pCommandBuffers} must be a valid pointer to an array of {@code commandBufferCount} {@code VkCommandBuffer} handles, each element of which must either be a valid handle or {@code NULL}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code commandPool} must be a valid {@code VkCommandPool} handle
  • *
  • {@code commandBufferCount} must be greater than 0
  • *
  • {@code commandPool} must have been created, allocated, or retrieved from {@code device}
  • *
  • Each element of {@code pCommandBuffers} that is a valid handle must have been created, allocated, or retrieved from {@code commandPool}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandPool} must be externally synchronized
  • *
  • Host access to each member of {@code pCommandBuffers} must be externally synchronized
  • *
* * @param device the logical device that owns the command pool. * @param commandPool the command pool from which the command buffers were allocated. */ public static void vkFreeCommandBuffers(VkDevice device, @NativeType("VkCommandPool") long commandPool, @NativeType("VkCommandBuffer const *") VkCommandBuffer pCommandBuffer) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { PointerBuffer pCommandBuffers = stack.pointers(pCommandBuffer); nvkFreeCommandBuffers(device, commandPool, 1, memAddress(pCommandBuffers)); } finally { stack.setPointer(stackPointer); } } // --- [ vkBeginCommandBuffer ] --- /** Unsafe version of: {@link #vkBeginCommandBuffer BeginCommandBuffer} */ public static int nvkBeginCommandBuffer(VkCommandBuffer commandBuffer, long pBeginInfo) { long __functionAddress = commandBuffer.getCapabilities().vkBeginCommandBuffer; return callPPI(commandBuffer.address(), pBeginInfo, __functionAddress); } /** * Start recording a command buffer. * *
C Specification
* *

To begin recording a command buffer, call:

* *

     * VkResult vkBeginCommandBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     const VkCommandBufferBeginInfo*             pBeginInfo);
* *
Valid Usage
* *
    *
  • {@code commandBuffer} must not be in the recording or pending state
  • *
  • If {@code commandBuffer} was allocated from a {@code VkCommandPool} which did not have the {@link #VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT} flag set, {@code commandBuffer} must be in the initial state
  • *
  • If {@code commandBuffer} is a secondary command buffer, the {@code pInheritanceInfo} member of {@code pBeginInfo} must be a valid {@link VkCommandBufferInheritanceInfo} structure
  • *
  • If {@code commandBuffer} is a secondary command buffer and either the {@code occlusionQueryEnable} member of the {@code pInheritanceInfo} member of {@code pBeginInfo} is {@link #VK_FALSE FALSE}, or the precise occlusion queries feature is not enabled, then {@code pBeginInfo→pInheritanceInfo→queryFlags} must not contain {@link #VK_QUERY_CONTROL_PRECISE_BIT QUERY_CONTROL_PRECISE_BIT}
  • *
  • If {@code commandBuffer} is a primary command buffer, then {@code pBeginInfo→flags} must not set both the {@link #VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT} and the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} flags
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pBeginInfo} must be a valid pointer to a valid {@link VkCommandBufferBeginInfo} structure
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkCommandBufferBeginInfo}

* * @param commandBuffer the handle of the command buffer which is to be put in the recording state. * @param pBeginInfo a pointer to a {@link VkCommandBufferBeginInfo} structure defining additional information about how the command buffer begins recording. */ @NativeType("VkResult") public static int vkBeginCommandBuffer(VkCommandBuffer commandBuffer, @NativeType("VkCommandBufferBeginInfo const *") VkCommandBufferBeginInfo pBeginInfo) { return nvkBeginCommandBuffer(commandBuffer, pBeginInfo.address()); } // --- [ vkEndCommandBuffer ] --- /** * Finish recording a command buffer. * *
C Specification
* *

To complete recording of a command buffer, call:

* *

     * VkResult vkEndCommandBuffer(
     *     VkCommandBuffer                             commandBuffer);
* *
Description
* *

If there was an error during recording, the application will be notified by an unsuccessful return code returned by {@code vkEndCommandBuffer}. If the application wishes to further use the command buffer, the command buffer must be reset.

* *

The command buffer must have been in the recording state, and is moved to the executable state.

* *
Valid Usage
* *
    *
  • {@code commandBuffer} must be in the recording state
  • *
  • If {@code commandBuffer} is a primary command buffer, there must not be an active render pass instance
  • *
  • All queries made active during the recording of {@code commandBuffer} must have been made inactive
  • *
  • Conditional rendering must not be active
  • *
  • If {@code commandBuffer} is a secondary command buffer, there must not be an outstanding {@link EXTDebugUtils#vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT} command recorded to {@code commandBuffer} that has not previously been ended by a call to {@link EXTDebugUtils#vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT}
  • *
  • If {@code commandBuffer} is a secondary command buffer, there must not be an outstanding {@link EXTDebugMarker#vkCmdDebugMarkerBeginEXT CmdDebugMarkerBeginEXT} command recorded to {@code commandBuffer} that has not previously been ended by a call to {@link EXTDebugMarker#vkCmdDebugMarkerEndEXT CmdDebugMarkerEndEXT}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param commandBuffer the command buffer to complete recording. */ @NativeType("VkResult") public static int vkEndCommandBuffer(VkCommandBuffer commandBuffer) { long __functionAddress = commandBuffer.getCapabilities().vkEndCommandBuffer; return callPI(commandBuffer.address(), __functionAddress); } // --- [ vkResetCommandBuffer ] --- /** * Reset a command buffer to the initial state. * *
C Specification
* *

To reset a command buffer, call:

* *

     * VkResult vkResetCommandBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkCommandBufferResetFlags                   flags);
* *
Description
* *

Any primary command buffer that is in the recording or executable state and has {@code commandBuffer} recorded into it, becomes invalid.

* *
Valid Usage
* *
    *
  • {@code commandBuffer} must not be in the pending state
  • *
  • {@code commandBuffer} must have been allocated from a pool that was created with the {@link #VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code flags} must be a valid combination of {@code VkCommandBufferResetFlagBits} values
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link #VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link #VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* * @param commandBuffer the command buffer to reset. The command buffer can be in any state other than pending, and is moved into the initial state. * @param flags a bitmask of {@code VkCommandBufferResetFlagBits} controlling the reset operation. */ @NativeType("VkResult") public static int vkResetCommandBuffer(VkCommandBuffer commandBuffer, @NativeType("VkCommandBufferResetFlags") int flags) { long __functionAddress = commandBuffer.getCapabilities().vkResetCommandBuffer; return callPI(commandBuffer.address(), flags, __functionAddress); } // --- [ vkCmdBindPipeline ] --- /** * Bind a pipeline object to a command buffer. * *
C Specification
* *

Once a pipeline has been created, it can be bound to the command buffer using the command:

* *

     * void vkCmdBindPipeline(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineBindPoint                         pipelineBindPoint,
     *     VkPipeline                                  pipeline);
* *
Description
* *

Once bound, a pipeline binding affects subsequent commands that interact with the given pipeline type in the command buffer until a different pipeline of the same type is bound to the bind point. Commands that do not interact with the given pipeline type must not be affected by the pipeline state.

* *
    *
  • The pipeline bound to {@link #VK_PIPELINE_BIND_POINT_COMPUTE PIPELINE_BIND_POINT_COMPUTE} controls the behavior of all dispatching commands.
  • *
  • The pipeline bound to {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS} controls the behavior of all drawing commands.
  • *
  • The pipeline bound to {@link KHRRayTracingPipeline#VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR PIPELINE_BIND_POINT_RAY_TRACING_KHR} controls the behavior of {@link KHRRayTracingPipeline#vkCmdTraceRaysKHR CmdTraceRaysKHR} and {@link KHRRayTracingPipeline#vkCmdTraceRaysIndirectKHR CmdTraceRaysIndirectKHR}.
  • *
  • The pipeline bound to {@link HUAWEISubpassShading#VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI} controls the behavior of {@link HUAWEISubpassShading#vkCmdSubpassShadingHUAWEI CmdSubpassShadingHUAWEI}.
  • *
* *
Valid Usage
* *
    *
  • If {@code pipelineBindPoint} is {@link #VK_PIPELINE_BIND_POINT_COMPUTE PIPELINE_BIND_POINT_COMPUTE}, the {@code VkCommandPool} that {@code commandBuffer} was allocated from must support compute operations
  • *
  • If {@code pipelineBindPoint} is {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}, the {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • If {@code pipelineBindPoint} is {@link #VK_PIPELINE_BIND_POINT_COMPUTE PIPELINE_BIND_POINT_COMPUTE}, {@code pipeline} must be a compute pipeline
  • *
  • If {@code pipelineBindPoint} is {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}, {@code pipeline} must be a graphics pipeline
  • *
  • If the variable multisample rate feature is not supported, {@code pipeline} is a graphics pipeline, the current subpass uses no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must match that set in the previous pipeline
  • *
  • If {@link VkPhysicalDeviceSampleLocationsPropertiesEXT}{@code ::variableSampleLocations} is {@link #VK_FALSE FALSE}, and {@code pipeline} is a graphics pipeline created with a {@link VkPipelineSampleLocationsStateCreateInfoEXT} structure having its {@code sampleLocationsEnable} member set to {@link #VK_TRUE TRUE} but without {@link EXTSampleLocations#VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT} enabled then the current render pass instance must have been begun by specifying a {@link VkRenderPassSampleLocationsBeginInfoEXT} structure whose {@code pPostSubpassSampleLocations} member contains an element with a {@code subpassIndex} matching the current subpass index and the {@code sampleLocationsInfo} member of that element must match the {@code sampleLocationsInfo} specified in {@link VkPipelineSampleLocationsStateCreateInfoEXT} when the pipeline was created
  • *
  • This command must not be recorded when transform feedback is active
  • *
  • If {@code pipelineBindPoint} is {@link KHRRayTracingPipeline#VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR PIPELINE_BIND_POINT_RAY_TRACING_KHR}, the {@code VkCommandPool} that {@code commandBuffer} was allocated from must support compute operations
  • *
  • If {@code pipelineBindPoint} is {@link KHRRayTracingPipeline#VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR PIPELINE_BIND_POINT_RAY_TRACING_KHR}, {@code pipeline} must be a ray tracing pipeline
  • *
  • {@code pipeline} must not have been created with {@link KHRPipelineLibrary#VK_PIPELINE_CREATE_LIBRARY_BIT_KHR PIPELINE_CREATE_LIBRARY_BIT_KHR} set
  • *
  • If {@code commandBuffer} is a secondary command buffer with {@link VkCommandBufferInheritanceViewportScissorInfoNV}{@code ::viewportScissor2D} enabled and {@code pipelineBindPoint} is {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}, then the {@code pipeline} must have been created with {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} or {@link #VK_DYNAMIC_STATE_VIEWPORT DYNAMIC_STATE_VIEWPORT}, and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} or {@link #VK_DYNAMIC_STATE_SCISSOR DYNAMIC_STATE_SCISSOR} enabled
  • *
  • If {@code commandBuffer} is a secondary command buffer with {@link VkCommandBufferInheritanceViewportScissorInfoNV}{@code ::viewportScissor2D} enabled and {@code pipelineBindPoint} is {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS} and {@code pipeline} was created with {@link VkPipelineDiscardRectangleStateCreateInfoEXT} structure and its {@code discardRectangleCount} member is not 0, then the pipeline must have been created with {@link EXTDiscardRectangles#VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT DYNAMIC_STATE_DISCARD_RECTANGLE_EXT} enabled
  • *
  • If {@code pipelineBindPoint} is {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS} and the provokingVertexModePerPipeline limit is {@link #VK_FALSE FALSE}, then pipeline’s {@link VkPipelineRasterizationProvokingVertexStateCreateInfoEXT}{@code ::provokingVertexMode} must be the same as that of any other pipelines previously bound to this bind point within the current render pass instance, including any pipeline already bound when beginning the render pass instance
  • *
  • If {@code pipelineBindPoint} is {@link HUAWEISubpassShading#VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI}, the {@code VkCommandPool} that {@code commandBuffer} was allocated from must support compute operations
  • *
  • If {@code pipelineBindPoint} is {@link HUAWEISubpassShading#VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI}, {@code pipeline} must be a subpass shading pipeline
  • *
  • If {@code pipeline} is a graphics pipeline, this command has been called inside a render pass instance started with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, and commands using the previously bound graphics pipeline have been recorded within the render pass instance, then the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::colorAttachmentCount} specified by this pipeline must match that set in the previous pipeline
  • *
  • If {@code pipeline} is a graphics pipeline, this command has been called inside a render pass instance started with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, and commands using the previously bound graphics pipeline have been recorded within the render pass instance, then the elements of {@link VkPipelineRenderingCreateInfoKHR}{@code ::pColorAttachmentFormats} specified by this pipeline must match that set in the previous pipeline
  • *
  • If {@code pipeline} is a graphics pipeline, this command has been called inside a render pass instance started with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, and commands using the previously bound graphics pipeline have been recorded within the render pass instance, then the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::depthAttachmentFormat} specified by this pipeline must match that set in the previous pipeline
  • *
  • If {@code pipeline} is a graphics pipeline, this command has been called inside a render pass instance started with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, and commands using the previously bound graphics pipeline have been recorded within the render pass instance, then the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::stencilAttachmentFormat} specified by this pipeline must match that set in the previous pipeline
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pipelineBindPoint} must be a valid {@code VkPipelineBindPoint} value
  • *
  • {@code pipeline} must be a valid {@code VkPipeline} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • Both of {@code commandBuffer}, and {@code pipeline} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer that the pipeline will be bound to. * @param pipelineBindPoint a {@code VkPipelineBindPoint} value specifying to which bind point the pipeline is bound. Binding one does not disturb the others. * @param pipeline the pipeline to be bound. */ public static void vkCmdBindPipeline(VkCommandBuffer commandBuffer, @NativeType("VkPipelineBindPoint") int pipelineBindPoint, @NativeType("VkPipeline") long pipeline) { long __functionAddress = commandBuffer.getCapabilities().vkCmdBindPipeline; callPJV(commandBuffer.address(), pipelineBindPoint, pipeline, __functionAddress); } // --- [ vkCmdSetViewport ] --- /** * Unsafe version of: {@link #vkCmdSetViewport CmdSetViewport} * * @param viewportCount the number of viewports whose parameters are updated by the command. */ public static void nvkCmdSetViewport(VkCommandBuffer commandBuffer, int firstViewport, int viewportCount, long pViewports) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetViewport; callPPV(commandBuffer.address(), firstViewport, viewportCount, pViewports, __functionAddress); } /** * Set the viewport dynamically for a command buffer. * *
C Specification
* *

To dynamically set the viewport transformation parameters, call:

* *

     * void vkCmdSetViewport(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    firstViewport,
     *     uint32_t                                    viewportCount,
     *     const VkViewport*                           pViewports);
* *
Description
* *

This command sets the viewport transformation parameters state for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_VIEWPORT DYNAMIC_STATE_VIEWPORT} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineViewportStateCreateInfo}{@code ::pViewports} values used to create the currently active pipeline.

* *

The viewport parameters taken from element i of {@code pViewports} replace the current state for the viewport index firstViewport + i, for i in [0, viewportCount).

* *
Valid Usage
* *
    *
  • The sum of {@code firstViewport} and {@code viewportCount} must be between 1 and {@link VkPhysicalDeviceLimits}{@code ::maxViewports}, inclusive
  • *
  • If the multiple viewports feature is not enabled, {@code firstViewport} must be 0
  • *
  • If the multiple viewports feature is not enabled, {@code viewportCount} must be 1
  • *
  • {@code commandBuffer} must not have {@link VkCommandBufferInheritanceViewportScissorInfoNV}{@code ::viewportScissor2D} enabled
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pViewports} must be a valid pointer to an array of {@code viewportCount} valid {@link VkViewport} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • {@code viewportCount} must be greater than 0
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* *
See Also
* *

{@link VkViewport}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param firstViewport the index of the first viewport whose parameters are updated by the command. * @param pViewports a pointer to an array of {@link VkViewport} structures specifying viewport parameters. */ public static void vkCmdSetViewport(VkCommandBuffer commandBuffer, @NativeType("uint32_t") int firstViewport, @NativeType("VkViewport const *") VkViewport.Buffer pViewports) { nvkCmdSetViewport(commandBuffer, firstViewport, pViewports.remaining(), pViewports.address()); } // --- [ vkCmdSetScissor ] --- /** * Unsafe version of: {@link #vkCmdSetScissor CmdSetScissor} * * @param scissorCount the number of scissors whose rectangles are updated by the command. */ public static void nvkCmdSetScissor(VkCommandBuffer commandBuffer, int firstScissor, int scissorCount, long pScissors) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetScissor; callPPV(commandBuffer.address(), firstScissor, scissorCount, pScissors, __functionAddress); } /** * Set scissor rectangles dynamically for a command buffer. * *
C Specification
* *

To dynamically set the scissor rectangles, call:

* *

     * void vkCmdSetScissor(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    firstScissor,
     *     uint32_t                                    scissorCount,
     *     const VkRect2D*                             pScissors);
* *
Description
* *

The scissor rectangles taken from element i of {@code pScissors} replace the current state for the scissor index firstScissor + i, for i in [0, scissorCount).

* *

This command sets the scissor rectangles for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_SCISSOR DYNAMIC_STATE_SCISSOR} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineViewportStateCreateInfo}{@code ::pScissors} values used to create the currently active pipeline.

* *
Valid Usage
* *
    *
  • The sum of {@code firstScissor} and {@code scissorCount} must be between 1 and {@link VkPhysicalDeviceLimits}{@code ::maxViewports}, inclusive
  • *
  • If the multiple viewports feature is not enabled, {@code firstScissor} must be 0
  • *
  • If the multiple viewports feature is not enabled, {@code scissorCount} must be 1
  • *
  • The {@code x} and {@code y} members of {@code offset} member of any element of {@code pScissors} must be greater than or equal to 0
  • *
  • Evaluation of (offset.x + extent.width) must not cause a signed integer addition overflow for any element of {@code pScissors}
  • *
  • Evaluation of (offset.y + extent.height) must not cause a signed integer addition overflow for any element of {@code pScissors}
  • *
  • If this command is recorded in a secondary command buffer with {@link VkCommandBufferInheritanceViewportScissorInfoNV}{@code ::viewportScissor2D} enabled, then this function must not be called
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pScissors} must be a valid pointer to an array of {@code scissorCount} {@link VkRect2D} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • {@code scissorCount} must be greater than 0
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* *
See Also
* *

{@link VkRect2D}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param firstScissor the index of the first scissor whose state is updated by the command. * @param pScissors a pointer to an array of {@link VkRect2D} structures defining scissor rectangles. */ public static void vkCmdSetScissor(VkCommandBuffer commandBuffer, @NativeType("uint32_t") int firstScissor, @NativeType("VkRect2D const *") VkRect2D.Buffer pScissors) { nvkCmdSetScissor(commandBuffer, firstScissor, pScissors.remaining(), pScissors.address()); } // --- [ vkCmdSetLineWidth ] --- /** * Set line width dynamically for a command buffer. * *
C Specification
* *

To dynamically set the line width, call:

* *

     * void vkCmdSetLineWidth(
     *     VkCommandBuffer                             commandBuffer,
     *     float                                       lineWidth);
* *
Description
* *

This command sets the line width for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_LINE_WIDTH DYNAMIC_STATE_LINE_WIDTH} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineRasterizationStateCreateInfo}{@code ::lineWidth} value used to create the currently active pipeline.

* *
Valid Usage
* *
    *
  • If the wide lines feature is not enabled, {@code lineWidth} must be {@code 1.0}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* * @param commandBuffer the command buffer into which the command will be recorded. * @param lineWidth the width of rasterized line segments. */ public static void vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetLineWidth; callPV(commandBuffer.address(), lineWidth, __functionAddress); } // --- [ vkCmdSetDepthBias ] --- /** * Set depth bias factors and clamp dynamically for a command buffer. * *
C Specification
* *

To dynamically set the depth bias parameters, call:

* *

     * void vkCmdSetDepthBias(
     *     VkCommandBuffer                             commandBuffer,
     *     float                                       depthBiasConstantFactor,
     *     float                                       depthBiasClamp,
     *     float                                       depthBiasSlopeFactor);
* *
Description
* *

This command sets the depth bias parameters for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_DEPTH_BIAS DYNAMIC_STATE_DEPTH_BIAS} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the corresponding {@link VkPipelineInputAssemblyStateCreateInfo}{@code ::depthBiasConstantFactor}, {@code depthBiasClamp}, and {@code depthBiasSlopeFactor} values used to create the currently active pipeline.

* *
Valid Usage
* *
    *
  • If the depth bias clamping feature is not enabled, {@code depthBiasClamp} must be {@code 0.0}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* * @param commandBuffer the command buffer into which the command will be recorded. * @param depthBiasConstantFactor a scalar factor controlling the constant depth value added to each fragment. * @param depthBiasClamp the maximum (or minimum) depth bias of a fragment. * @param depthBiasSlopeFactor a scalar factor applied to a fragment’s slope in depth bias calculations. */ public static void vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetDepthBias; callPV(commandBuffer.address(), depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, __functionAddress); } // --- [ vkCmdSetBlendConstants ] --- /** Unsafe version of: {@link #vkCmdSetBlendConstants CmdSetBlendConstants} */ public static void nvkCmdSetBlendConstants(VkCommandBuffer commandBuffer, long blendConstants) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetBlendConstants; callPPV(commandBuffer.address(), blendConstants, __functionAddress); } /** * Set the values of blend constants. * *
C Specification
* *

To dynamically set and change the blend constants, call:

* *

     * void vkCmdSetBlendConstants(
     *     VkCommandBuffer                             commandBuffer,
     *     const float                                 blendConstants[4]);
* *
Description
* *

This command sets blend constants for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_BLEND_CONSTANTS DYNAMIC_STATE_BLEND_CONSTANTS} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineColorBlendStateCreateInfo}{@code ::blendConstants} values used to create the currently active pipeline.

* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* * @param commandBuffer the command buffer into which the command will be recorded. * @param blendConstants a pointer to an array of four values specifying the Rc, Gc, Bc, and Ac components of the blend constant color used in blending, depending on the blend factor. */ public static void vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, @NativeType("float const *") FloatBuffer blendConstants) { if (CHECKS) { check(blendConstants, 4); } nvkCmdSetBlendConstants(commandBuffer, memAddress(blendConstants)); } // --- [ vkCmdSetDepthBounds ] --- /** * Set depth bounds range dynamically for a command buffer. * *
C Specification
* *

To dynamically set the depth bounds range, call:

* *

     * void vkCmdSetDepthBounds(
     *     VkCommandBuffer                             commandBuffer,
     *     float                                       minDepthBounds,
     *     float                                       maxDepthBounds);
* *
Description
* *

This command sets the depth bounds range for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_DEPTH_BOUNDS DYNAMIC_STATE_DEPTH_BOUNDS} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineDepthStencilStateCreateInfo}{@code ::minDepthBounds} and {@link VkPipelineDepthStencilStateCreateInfo}{@code ::maxDepthBounds} values used to create the currently active pipeline.

* *
Valid Usage
* *
    *
  • Unless the {@link EXTDepthRangeUnrestricted VK_EXT_depth_range_unrestricted} extension is enabled {@code minDepthBounds} must be between {@code 0.0} and {@code 1.0}, inclusive
  • *
  • Unless the {@link EXTDepthRangeUnrestricted VK_EXT_depth_range_unrestricted} extension is enabled {@code maxDepthBounds} must be between {@code 0.0} and {@code 1.0}, inclusive
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* * @param commandBuffer the command buffer into which the command will be recorded. * @param minDepthBounds the minimum depth bound. * @param maxDepthBounds the maximum depth bound. */ public static void vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetDepthBounds; callPV(commandBuffer.address(), minDepthBounds, maxDepthBounds, __functionAddress); } // --- [ vkCmdSetStencilCompareMask ] --- /** * Set stencil compare mask dynamically for a command buffer. * *
C Specification
* *

To dynamically set the stencil compare mask call:

* *

     * void vkCmdSetStencilCompareMask(
     *     VkCommandBuffer                             commandBuffer,
     *     VkStencilFaceFlags                          faceMask,
     *     uint32_t                                    compareMask);
* *
Description
* *

This command sets the stencil compare mask for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK DYNAMIC_STATE_STENCIL_COMPARE_MASK} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineDepthStencilStateCreateInfo}{@code ::compareMask} value used to create the currently active pipeline, for both front and back faces.

* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code faceMask} must be a valid combination of {@code VkStencilFaceFlagBits} values
  • *
  • {@code faceMask} must not be 0
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* * @param commandBuffer the command buffer into which the command will be recorded. * @param faceMask a bitmask of {@code VkStencilFaceFlagBits} specifying the set of stencil state for which to update the compare mask. * @param compareMask the new value to use as the stencil compare mask. */ public static void vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, @NativeType("VkStencilFaceFlags") int faceMask, @NativeType("uint32_t") int compareMask) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetStencilCompareMask; callPV(commandBuffer.address(), faceMask, compareMask, __functionAddress); } // --- [ vkCmdSetStencilWriteMask ] --- /** * Set stencil write mask dynamically for a command buffer. * *
C Specification
* *

To dynamically set the stencil write mask, call:

* *

     * void vkCmdSetStencilWriteMask(
     *     VkCommandBuffer                             commandBuffer,
     *     VkStencilFaceFlags                          faceMask,
     *     uint32_t                                    writeMask);
* *
Description
* *

This command sets the stencil write mask for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_STENCIL_WRITE_MASK DYNAMIC_STATE_STENCIL_WRITE_MASK} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineDepthStencilStateCreateInfo}{@code ::writeMask} value used to create the currently active pipeline, for both front and back faces.

* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code faceMask} must be a valid combination of {@code VkStencilFaceFlagBits} values
  • *
  • {@code faceMask} must not be 0
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* * @param commandBuffer the command buffer into which the command will be recorded. * @param faceMask a bitmask of {@code VkStencilFaceFlagBits} specifying the set of stencil state for which to update the write mask, as described above for {@link #vkCmdSetStencilCompareMask CmdSetStencilCompareMask}. * @param writeMask the new value to use as the stencil write mask. */ public static void vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, @NativeType("VkStencilFaceFlags") int faceMask, @NativeType("uint32_t") int writeMask) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetStencilWriteMask; callPV(commandBuffer.address(), faceMask, writeMask, __functionAddress); } // --- [ vkCmdSetStencilReference ] --- /** * Set stencil reference value dynamically for a command buffer. * *
C Specification
* *

To dynamically set the stencil reference value, call:

* *

     * void vkCmdSetStencilReference(
     *     VkCommandBuffer                             commandBuffer,
     *     VkStencilFaceFlags                          faceMask,
     *     uint32_t                                    reference);
* *
Description
* *

This command sets the stencil reference value for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_STENCIL_REFERENCE DYNAMIC_STATE_STENCIL_REFERENCE} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineDepthStencilStateCreateInfo}{@code ::reference} value used to create the currently active pipeline, for both front and back faces.

* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code faceMask} must be a valid combination of {@code VkStencilFaceFlagBits} values
  • *
  • {@code faceMask} must not be 0
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* * @param commandBuffer the command buffer into which the command will be recorded. * @param faceMask a bitmask of {@code VkStencilFaceFlagBits} specifying the set of stencil state for which to update the reference value, as described above for {@link #vkCmdSetStencilCompareMask CmdSetStencilCompareMask}. * @param reference the new value to use as the stencil reference value. */ public static void vkCmdSetStencilReference(VkCommandBuffer commandBuffer, @NativeType("VkStencilFaceFlags") int faceMask, @NativeType("uint32_t") int reference) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetStencilReference; callPV(commandBuffer.address(), faceMask, reference, __functionAddress); } // --- [ vkCmdBindDescriptorSets ] --- /** * Unsafe version of: {@link #vkCmdBindDescriptorSets CmdBindDescriptorSets} * * @param descriptorSetCount the number of elements in the {@code pDescriptorSets} array. * @param dynamicOffsetCount the number of dynamic offsets in the {@code pDynamicOffsets} array. */ public static void nvkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, int pipelineBindPoint, long layout, int firstSet, int descriptorSetCount, long pDescriptorSets, int dynamicOffsetCount, long pDynamicOffsets) { long __functionAddress = commandBuffer.getCapabilities().vkCmdBindDescriptorSets; callPJPPV(commandBuffer.address(), pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets, __functionAddress); } /** * Binds descriptor sets to a command buffer. * *
C Specification
* *

To bind one or more descriptor sets to a command buffer, call:

* *

     * void vkCmdBindDescriptorSets(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineBindPoint                         pipelineBindPoint,
     *     VkPipelineLayout                            layout,
     *     uint32_t                                    firstSet,
     *     uint32_t                                    descriptorSetCount,
     *     const VkDescriptorSet*                      pDescriptorSets,
     *     uint32_t                                    dynamicOffsetCount,
     *     const uint32_t*                             pDynamicOffsets);
* *
Description
* *

{@code vkCmdBindDescriptorSets} causes the sets numbered [{@code firstSet}.. {@code firstSet}+{@code descriptorSetCount}-1] to use the bindings stored in {@code pDescriptorSets}[0..descriptorSetCount-1] for subsequent bound pipeline commands set by {@code pipelineBindPoint}. Any bindings that were previously applied via these sets are no longer valid.

* *

Once bound, a descriptor set affects rendering of subsequent commands that interact with the given pipeline type in the command buffer until either a different set is bound to the same set number, or the set is disturbed as described in Pipeline Layout Compatibility.

* *

A compatible descriptor set must be bound for all set numbers that any shaders in a pipeline access, at the time that a drawing or dispatching command is recorded to execute using that pipeline. However, if none of the shaders in a pipeline statically use any bindings with a particular set number, then no descriptor set need be bound for that set number, even if the pipeline layout includes a non-trivial descriptor set layout for that set number.

* *

If any of the sets being bound include dynamic uniform or storage buffers, then {@code pDynamicOffsets} includes one element for each array element in each dynamic descriptor type binding in each set. Values are taken from {@code pDynamicOffsets} in an order such that all entries for set N come before set N+1; within a set, entries are ordered by the binding numbers in the descriptor set layouts; and within a binding array, elements are in order. {@code dynamicOffsetCount} must equal the total number of dynamic descriptors in the sets being bound.

* *

The effective offset used for dynamic uniform and storage buffer bindings is the sum of the relative offset taken from {@code pDynamicOffsets}, and the base address of the buffer plus base offset in the descriptor set. The range of the dynamic uniform and storage buffer bindings is the buffer range as specified in the descriptor set.

* *

Each of the {@code pDescriptorSets} must be compatible with the pipeline layout specified by {@code layout}. The layout used to program the bindings must also be compatible with the pipeline used in subsequent bound pipeline commands with that pipeline type, as defined in the Pipeline Layout Compatibility section.

* *

The descriptor set contents bound by a call to {@code vkCmdBindDescriptorSets} may be consumed at the following times:

* *
    *
  • For descriptor bindings created with the {@link VK12#VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT} bit set, the contents may be consumed when the command buffer is submitted to a queue, or during shader execution of the resulting draws and dispatches, or any time in between. Otherwise,
  • *
  • during host execution of the command, or during shader execution of the resulting draws and dispatches, or any time in between.
  • *
* *

Thus, the contents of a descriptor set binding must not be altered (overwritten by an update command, or freed) between the first point in time that it may be consumed, and when the command completes executing on the queue.

* *

The contents of {@code pDynamicOffsets} are consumed immediately during execution of {@code vkCmdBindDescriptorSets}. Once all pending uses have completed, it is legal to update and reuse a descriptor set.

* *
Valid Usage
* *
    *
  • Each element of {@code pDescriptorSets} must have been allocated with a {@code VkDescriptorSetLayout} that matches (is the same as, or identically defined as) the {@code VkDescriptorSetLayout} at set n in {@code layout}, where n is the sum of {@code firstSet} and the index into {@code pDescriptorSets}
  • *
  • {@code dynamicOffsetCount} must be equal to the total number of dynamic descriptors in {@code pDescriptorSets}
  • *
  • The sum of {@code firstSet} and {@code descriptorSetCount} must be less than or equal to {@link VkPipelineLayoutCreateInfo}{@code ::setLayoutCount} provided when {@code layout} was created
  • *
  • {@code pipelineBindPoint} must be supported by the {@code commandBuffer}’s parent {@code VkCommandPool}’s queue family
  • *
  • Each element of {@code pDynamicOffsets} which corresponds to a descriptor binding with type {@link #VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC} must be a multiple of {@link VkPhysicalDeviceLimits}{@code ::minUniformBufferOffsetAlignment}
  • *
  • Each element of {@code pDynamicOffsets} which corresponds to a descriptor binding with type {@link #VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC} must be a multiple of {@link VkPhysicalDeviceLimits}{@code ::minStorageBufferOffsetAlignment}
  • *
  • For each dynamic uniform or storage buffer binding in {@code pDescriptorSets}, the sum of the effective offset, as defined above, and the range of the binding must be less than or equal to the size of the buffer
  • *
  • Each element of {@code pDescriptorSets} must not have been allocated from a {@code VkDescriptorPool} with the {@link VALVEMutableDescriptorType#VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE} flag set
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pipelineBindPoint} must be a valid {@code VkPipelineBindPoint} value
  • *
  • {@code layout} must be a valid {@code VkPipelineLayout} handle
  • *
  • {@code pDescriptorSets} must be a valid pointer to an array of {@code descriptorSetCount} valid {@code VkDescriptorSet} handles
  • *
  • If {@code dynamicOffsetCount} is not 0, {@code pDynamicOffsets} must be a valid pointer to an array of {@code dynamicOffsetCount} {@code uint32_t} values
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • {@code descriptorSetCount} must be greater than 0
  • *
  • Each of {@code commandBuffer}, {@code layout}, and the elements of {@code pDescriptorSets} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer that the descriptor sets will be bound to. * @param pipelineBindPoint a {@code VkPipelineBindPoint} indicating the type of the pipeline that will use the descriptors. There is a separate set of bind points for each pipeline type, so binding one does not disturb the others. * @param layout a {@code VkPipelineLayout} object used to program the bindings. * @param firstSet the set number of the first descriptor set to be bound. * @param pDescriptorSets a pointer to an array of handles to {@code VkDescriptorSet} objects describing the descriptor sets to bind to. * @param pDynamicOffsets a pointer to an array of {@code uint32_t} values specifying dynamic offsets. */ public static void vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, @NativeType("VkPipelineBindPoint") int pipelineBindPoint, @NativeType("VkPipelineLayout") long layout, @NativeType("uint32_t") int firstSet, @NativeType("VkDescriptorSet const *") LongBuffer pDescriptorSets, @Nullable @NativeType("uint32_t const *") IntBuffer pDynamicOffsets) { nvkCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, pDescriptorSets.remaining(), memAddress(pDescriptorSets), remainingSafe(pDynamicOffsets), memAddressSafe(pDynamicOffsets)); } // --- [ vkCmdBindIndexBuffer ] --- /** * Bind an index buffer to a command buffer. * *
C Specification
* *

To bind an index buffer to a command buffer, call:

* *

     * void vkCmdBindIndexBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    buffer,
     *     VkDeviceSize                                offset,
     *     VkIndexType                                 indexType);
* *
Valid Usage
* *
    *
  • {@code offset} must be less than the size of {@code buffer}
  • *
  • The sum of {@code offset} and the address of the range of {@code VkDeviceMemory} object that is backing {@code buffer}, must be a multiple of the type indicated by {@code indexType}
  • *
  • {@code buffer} must have been created with the {@link #VK_BUFFER_USAGE_INDEX_BUFFER_BIT BUFFER_USAGE_INDEX_BUFFER_BIT} flag
  • *
  • If {@code buffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code indexType} must not be {@link KHRAccelerationStructure#VK_INDEX_TYPE_NONE_KHR INDEX_TYPE_NONE_KHR}
  • *
  • If {@code indexType} is {@link EXTIndexTypeUint8#VK_INDEX_TYPE_UINT8_EXT INDEX_TYPE_UINT8_EXT}, the indexTypeUint8 feature must be enabled
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code buffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code indexType} must be a valid {@code VkIndexType} value
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • Both of {@code buffer}, and {@code commandBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* * @param commandBuffer the command buffer into which the command is recorded. * @param buffer the buffer being bound. * @param offset the starting offset in bytes within {@code buffer} used in index buffer address calculations. * @param indexType a {@code VkIndexType} value specifying the size of the indices. */ public static void vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long buffer, @NativeType("VkDeviceSize") long offset, @NativeType("VkIndexType") int indexType) { long __functionAddress = commandBuffer.getCapabilities().vkCmdBindIndexBuffer; callPJJV(commandBuffer.address(), buffer, offset, indexType, __functionAddress); } // --- [ vkCmdBindVertexBuffers ] --- /** * Unsafe version of: {@link #vkCmdBindVertexBuffers CmdBindVertexBuffers} * * @param bindingCount the number of vertex input bindings whose state is updated by the command. */ public static void nvkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, int firstBinding, int bindingCount, long pBuffers, long pOffsets) { long __functionAddress = commandBuffer.getCapabilities().vkCmdBindVertexBuffers; callPPPV(commandBuffer.address(), firstBinding, bindingCount, pBuffers, pOffsets, __functionAddress); } /** * Bind vertex buffers to a command buffer. * *
C Specification
* *

To bind vertex buffers to a command buffer for use in subsequent drawing commands, call:

* *

     * void vkCmdBindVertexBuffers(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    firstBinding,
     *     uint32_t                                    bindingCount,
     *     const VkBuffer*                             pBuffers,
     *     const VkDeviceSize*                         pOffsets);
* *
Description
* *

The values taken from elements i of {@code pBuffers} and {@code pOffsets} replace the current state for the vertex input binding firstBinding + i, for i in [0, bindingCount). The vertex input binding is updated to start at the offset indicated by {@code pOffsets}[i] from the start of the buffer {@code pBuffers}[i]. All vertex input attributes that use each of these bindings will use these updated addresses in their address calculations for subsequent drawing commands. If the nullDescriptor feature is enabled, elements of {@code pBuffers} can be {@link #VK_NULL_HANDLE NULL_HANDLE}, and can be used by the vertex shader. If a vertex input attribute is bound to a vertex input binding that is {@link #VK_NULL_HANDLE NULL_HANDLE}, the values taken from memory are considered to be zero, and missing G, B, or A components are filled with (0,0,1).

* *
Valid Usage
* *
    *
  • {@code firstBinding} must be less than {@link VkPhysicalDeviceLimits}{@code ::maxVertexInputBindings}
  • *
  • The sum of {@code firstBinding} and {@code bindingCount} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxVertexInputBindings}
  • *
  • All elements of {@code pOffsets} must be less than the size of the corresponding element in {@code pBuffers}
  • *
  • All elements of {@code pBuffers} must have been created with the {@link #VK_BUFFER_USAGE_VERTEX_BUFFER_BIT BUFFER_USAGE_VERTEX_BUFFER_BIT} flag
  • *
  • Each element of {@code pBuffers} that is non-sparse must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • If the nullDescriptor feature is not enabled, all elements of {@code pBuffers} must not be {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
  • If an element of {@code pBuffers} is {@link #VK_NULL_HANDLE NULL_HANDLE}, then the corresponding element of {@code pOffsets} must be zero
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pBuffers} must be a valid pointer to an array of {@code bindingCount} valid or {@link #VK_NULL_HANDLE NULL_HANDLE} {@code VkBuffer} handles
  • *
  • {@code pOffsets} must be a valid pointer to an array of {@code bindingCount} {@code VkDeviceSize} values
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • {@code bindingCount} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and the elements of {@code pBuffers} that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* * @param commandBuffer the command buffer into which the command is recorded. * @param firstBinding the index of the first vertex input binding whose state is updated by the command. * @param pBuffers a pointer to an array of buffer handles. * @param pOffsets a pointer to an array of buffer offsets. */ public static void vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, @NativeType("uint32_t") int firstBinding, @NativeType("VkBuffer const *") LongBuffer pBuffers, @NativeType("VkDeviceSize const *") LongBuffer pOffsets) { if (CHECKS) { check(pOffsets, pBuffers.remaining()); } nvkCmdBindVertexBuffers(commandBuffer, firstBinding, pBuffers.remaining(), memAddress(pBuffers), memAddress(pOffsets)); } // --- [ vkCmdDraw ] --- /** * Draw primitives. * *
C Specification
* *

To record a non-indexed draw, call:

* *

     * void vkCmdDraw(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    vertexCount,
     *     uint32_t                                    instanceCount,
     *     uint32_t                                    firstVertex,
     *     uint32_t                                    firstInstance);
* *
Description
* *

When the command is executed, primitives are assembled using the current primitive topology and {@code vertexCount} consecutive vertex indices with the first {@code vertexIndex} value equal to {@code firstVertex}. The primitives are drawn {@code instanceCount} times with {@code instanceIndex} starting with {@code firstInstance} and increasing sequentially for each instance. The assembled primitives execute the bound graphics pipeline.

* *
Valid Usage
* *
    *
  • If a {@code VkSampler} created with {@code magFilter} or {@code minFilter} equal to {@link #VK_FILTER_LINEAR FILTER_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkSampler} created with {@code mipmapMode} equal to {@link #VK_SAMPLER_MIPMAP_MODE_LINEAR SAMPLER_MIPMAP_MODE_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkImageView} is accessed using atomic operations as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT}
  • *
  • If a {@code VkImageView} is sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command, then the image view’s format features must contain {@link EXTFilterCubic#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubic} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} with a reduction mode of either {@link VK12#VK_SAMPLER_REDUCTION_MODE_MIN SAMPLER_REDUCTION_MODE_MIN} or {@link VK12#VK_SAMPLER_REDUCTION_MODE_MAX SAMPLER_REDUCTION_MODE_MAX} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering together with minmax filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubicMinmax} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImage} created with a {@link VkImageCreateInfo}{@code ::flags} containing {@link NVCornerSampledImage#VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV IMAGE_CREATE_CORNER_SAMPLED_BIT_NV} sampled as a result of this command must only be sampled using a {@code VkSamplerAddressMode} of {@link #VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being written as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being read as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR}
  • *
  • For each set n that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for set n, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • If the {@code maintenance4} feature is not enabled, then for each push constant that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for push constants, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • Descriptors in each bound descriptor set, specified via {@code vkCmdBindDescriptorSets}, must be valid if they are statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command
  • *
  • A valid pipeline must be bound to the pipeline bind point used by this command
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if the {@link NVInheritedViewportScissor VK_NV_inherited_viewport_scissor} extension is enabled) for {@code commandBuffer}, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
  • *
  • There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in the {@code VkPipeline} object bound to the pipeline bind point used by this command, since that pipeline was bound
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used to sample from any {@code VkImage} with a {@code VkImageView} of the type {@link #VK_IMAGE_VIEW_TYPE_3D IMAGE_VIEW_TYPE_3D}, {@link #VK_IMAGE_VIEW_TYPE_CUBE IMAGE_VIEW_TYPE_CUBE}, {@link #VK_IMAGE_VIEW_TYPE_1D_ARRAY IMAGE_VIEW_TYPE_1D_ARRAY}, {@link #VK_IMAGE_VIEW_TYPE_2D_ARRAY IMAGE_VIEW_TYPE_2D_ARRAY} or {@link #VK_IMAGE_VIEW_TYPE_CUBE_ARRAY IMAGE_VIEW_TYPE_CUBE_ARRAY}, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions with {@code ImplicitLod}, {@code Dref} or {@code Proj} in their name, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions that includes a LOD bias or any offset values, in any shader stage
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, any resource accessed by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be a protected resource
  • *
  • If a {@code VkImageView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the image view’s format
  • *
  • If a {@code VkBufferView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the buffer view’s format
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkImage} objects created with the {@link #VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkBuffer} objects created with the {@link #VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • The current render pass must be compatible with the {@code renderPass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
  • *
  • The subpass index of the current render pass must be equal to the {@code subpass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
  • *
  • Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
  • *
  • Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter
  • *
  • If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to {@link VkPhysicalDeviceMultiviewProperties}{@code ::maxMultiviewInstanceIndex}
  • *
  • If the bound graphics pipeline was created with {@link VkPipelineSampleLocationsStateCreateInfoEXT}{@code ::sampleLocationsEnable} set to {@link #VK_TRUE TRUE} and the current subpass has a depth/stencil attachment, then that attachment must have been created with the {@link EXTSampleLocations#VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT} bit set
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::scissorCount} of the pipeline
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::viewportCount} of the pipeline
  • *
  • If the bound graphics pipeline state was created with both the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic states enabled then both {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} and {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportWScalingStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVClipSpaceWScaling#vkCmdSetViewportWScalingNV CmdSetViewportWScalingNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportShadingRateImageStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVShadingRateImage#vkCmdSetViewportShadingRatePaletteNV CmdSetViewportShadingRatePaletteNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportSwizzleStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportSwizzleStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV}{@code ::exclusiveScissorCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT} dynamic state enabled then {@link EXTExtendedDynamicState#vkCmdSetPrimitiveTopologyEXT CmdSetPrimitiveTopologyEXT} must have been called in the current command buffer prior to this drawing command, and the {@code primitiveTopology} parameter of {@code vkCmdSetPrimitiveTopologyEXT} must be of the same topology class as the pipeline {@link VkPipelineInputAssemblyStateCreateInfo}{@code ::topology} state
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPatchControlPointsEXT CmdSetPatchControlPointsEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetRasterizerDiscardEnableEXT CmdSetRasterizerDiscardEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetDepthBiasEnableEXT CmdSetDepthBiasEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_LOGIC_OP_EXT DYNAMIC_STATE_LOGIC_OP_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetLogicOpEXT CmdSetLogicOpEXT} must have been called in the current command buffer prior to this drawing command and the {@code logicOp} must be a valid {@code VkLogicOp} value
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPrimitiveRestartEnableEXT CmdSetPrimitiveRestartEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the {@code primitiveFragmentShadingRateWithMultipleViewports} limit is not supported, the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the {@code PrimitiveShadingRateKHR} built-in, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must be 1
  • *
  • If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not contain {@link #VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT}, then the {@code blendEnable} member of the corresponding element of the {@code pAttachments} member of {@code pColorBlendState} must be {@link #VK_FALSE FALSE}
  • *
  • If rasterization is not disabled in the bound graphics pipeline, and neither the {@link AMDMixedAttachmentSamples VK_AMD_mixed_attachment_samples} nor the {@link NVFramebufferMixedSamples VK_NV_framebuffer_mixed_samples} extensions are enabled, then {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} must be the same as the current subpass color and/or depth/stencil attachments
  • *
  • If the bound graphics pipeline was created with both the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic states enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
  • *
  • If the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic state enabled, but not the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must have been called in the current command buffer prior to this draw command, and the {@code pStrides} parameter of {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must not be {@code NULL}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK12#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::viewMask} equal to {@link VkRenderingInfoKHR}{@code ::viewMask}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::colorAttachmentCount} equal to {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a {@code VkFormat} equal to the corresponding element of {@link VkPipelineRenderingCreateInfoKHR}{@code ::pColorAttachmentFormats} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::depthAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::stencilAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentShadingRateAttachmentInfoKHR}{@code ::imageView} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentDensityMapAttachmentInfoEXT}{@code ::imageView} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT}
  • *
  • If the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the corresponding element of the {@code pColorAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline must have been created with a {@link VkGraphicsPipelineCreateInfo}{@code ::renderPass} equal to {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
* *
    *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, any resource written to by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be an unprotected resource
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, pipeline stages other than the framebuffer-space and compute stages in the {@code VkPipeline} object bound to the pipeline bind point used by this command must not write to any resource
  • *
  • If any of the shader stages of the {@code VkPipeline} bound to the pipeline bind point used by this command uses the RayQueryKHR capability, then {@code commandBuffer} must not be a protected command buffer
  • *
* *
    *
  • All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or {@link #VK_NULL_HANDLE NULL_HANDLE} buffers bound
  • *
  • If the nullDescriptor feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
  • For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called inside of a render pass instance
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryInsideGraphics
* * @param commandBuffer the command buffer into which the command is recorded. * @param vertexCount the number of vertices to draw. * @param instanceCount the number of instances to draw. * @param firstVertex the index of the first vertex to draw. * @param firstInstance the instance ID of the first instance to draw. */ public static void vkCmdDraw(VkCommandBuffer commandBuffer, @NativeType("uint32_t") int vertexCount, @NativeType("uint32_t") int instanceCount, @NativeType("uint32_t") int firstVertex, @NativeType("uint32_t") int firstInstance) { long __functionAddress = commandBuffer.getCapabilities().vkCmdDraw; callPV(commandBuffer.address(), vertexCount, instanceCount, firstVertex, firstInstance, __functionAddress); } // --- [ vkCmdDrawIndexed ] --- /** * Draw primitives with indexed vertices. * *
C Specification
* *

To record an indexed draw, call:

* *

     * void vkCmdDrawIndexed(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    indexCount,
     *     uint32_t                                    instanceCount,
     *     uint32_t                                    firstIndex,
     *     int32_t                                     vertexOffset,
     *     uint32_t                                    firstInstance);
* *
Description
* *

When the command is executed, primitives are assembled using the current primitive topology and {@code indexCount} vertices whose indices are retrieved from the index buffer. The index buffer is treated as an array of tightly packed unsigned integers of size defined by the {@link #vkCmdBindIndexBuffer CmdBindIndexBuffer}{@code ::indexType} parameter with which the buffer was bound.

* *

The first vertex index is at an offset of firstIndex × indexSize + offset within the bound index buffer, where {@code offset} is the offset specified by {@code vkCmdBindIndexBuffer} and {@code indexSize} is the byte size of the type specified by {@code indexType}. Subsequent index values are retrieved from consecutive locations in the index buffer. Indices are first compared to the primitive restart value, then zero extended to 32 bits (if the {@code indexType} is {@link EXTIndexTypeUint8#VK_INDEX_TYPE_UINT8_EXT INDEX_TYPE_UINT8_EXT} or {@link #VK_INDEX_TYPE_UINT16 INDEX_TYPE_UINT16}) and have {@code vertexOffset} added to them, before being supplied as the {@code vertexIndex} value.

* *

The primitives are drawn {@code instanceCount} times with {@code instanceIndex} starting with {@code firstInstance} and increasing sequentially for each instance. The assembled primitives execute the bound graphics pipeline.

* *
Valid Usage
* *
    *
  • If a {@code VkSampler} created with {@code magFilter} or {@code minFilter} equal to {@link #VK_FILTER_LINEAR FILTER_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkSampler} created with {@code mipmapMode} equal to {@link #VK_SAMPLER_MIPMAP_MODE_LINEAR SAMPLER_MIPMAP_MODE_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkImageView} is accessed using atomic operations as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT}
  • *
  • If a {@code VkImageView} is sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command, then the image view’s format features must contain {@link EXTFilterCubic#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubic} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} with a reduction mode of either {@link VK12#VK_SAMPLER_REDUCTION_MODE_MIN SAMPLER_REDUCTION_MODE_MIN} or {@link VK12#VK_SAMPLER_REDUCTION_MODE_MAX SAMPLER_REDUCTION_MODE_MAX} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering together with minmax filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubicMinmax} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImage} created with a {@link VkImageCreateInfo}{@code ::flags} containing {@link NVCornerSampledImage#VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV IMAGE_CREATE_CORNER_SAMPLED_BIT_NV} sampled as a result of this command must only be sampled using a {@code VkSamplerAddressMode} of {@link #VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being written as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being read as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR}
  • *
  • For each set n that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for set n, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • If the {@code maintenance4} feature is not enabled, then for each push constant that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for push constants, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • Descriptors in each bound descriptor set, specified via {@code vkCmdBindDescriptorSets}, must be valid if they are statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command
  • *
  • A valid pipeline must be bound to the pipeline bind point used by this command
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if the {@link NVInheritedViewportScissor VK_NV_inherited_viewport_scissor} extension is enabled) for {@code commandBuffer}, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
  • *
  • There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in the {@code VkPipeline} object bound to the pipeline bind point used by this command, since that pipeline was bound
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used to sample from any {@code VkImage} with a {@code VkImageView} of the type {@link #VK_IMAGE_VIEW_TYPE_3D IMAGE_VIEW_TYPE_3D}, {@link #VK_IMAGE_VIEW_TYPE_CUBE IMAGE_VIEW_TYPE_CUBE}, {@link #VK_IMAGE_VIEW_TYPE_1D_ARRAY IMAGE_VIEW_TYPE_1D_ARRAY}, {@link #VK_IMAGE_VIEW_TYPE_2D_ARRAY IMAGE_VIEW_TYPE_2D_ARRAY} or {@link #VK_IMAGE_VIEW_TYPE_CUBE_ARRAY IMAGE_VIEW_TYPE_CUBE_ARRAY}, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions with {@code ImplicitLod}, {@code Dref} or {@code Proj} in their name, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions that includes a LOD bias or any offset values, in any shader stage
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, any resource accessed by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be a protected resource
  • *
  • If a {@code VkImageView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the image view’s format
  • *
  • If a {@code VkBufferView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the buffer view’s format
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkImage} objects created with the {@link #VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkBuffer} objects created with the {@link #VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • The current render pass must be compatible with the {@code renderPass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
  • *
  • The subpass index of the current render pass must be equal to the {@code subpass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
  • *
  • Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
  • *
  • Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter
  • *
  • If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to {@link VkPhysicalDeviceMultiviewProperties}{@code ::maxMultiviewInstanceIndex}
  • *
  • If the bound graphics pipeline was created with {@link VkPipelineSampleLocationsStateCreateInfoEXT}{@code ::sampleLocationsEnable} set to {@link #VK_TRUE TRUE} and the current subpass has a depth/stencil attachment, then that attachment must have been created with the {@link EXTSampleLocations#VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT} bit set
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::scissorCount} of the pipeline
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::viewportCount} of the pipeline
  • *
  • If the bound graphics pipeline state was created with both the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic states enabled then both {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} and {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportWScalingStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVClipSpaceWScaling#vkCmdSetViewportWScalingNV CmdSetViewportWScalingNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportShadingRateImageStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVShadingRateImage#vkCmdSetViewportShadingRatePaletteNV CmdSetViewportShadingRatePaletteNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportSwizzleStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportSwizzleStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV}{@code ::exclusiveScissorCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT} dynamic state enabled then {@link EXTExtendedDynamicState#vkCmdSetPrimitiveTopologyEXT CmdSetPrimitiveTopologyEXT} must have been called in the current command buffer prior to this drawing command, and the {@code primitiveTopology} parameter of {@code vkCmdSetPrimitiveTopologyEXT} must be of the same topology class as the pipeline {@link VkPipelineInputAssemblyStateCreateInfo}{@code ::topology} state
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPatchControlPointsEXT CmdSetPatchControlPointsEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetRasterizerDiscardEnableEXT CmdSetRasterizerDiscardEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetDepthBiasEnableEXT CmdSetDepthBiasEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_LOGIC_OP_EXT DYNAMIC_STATE_LOGIC_OP_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetLogicOpEXT CmdSetLogicOpEXT} must have been called in the current command buffer prior to this drawing command and the {@code logicOp} must be a valid {@code VkLogicOp} value
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPrimitiveRestartEnableEXT CmdSetPrimitiveRestartEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the {@code primitiveFragmentShadingRateWithMultipleViewports} limit is not supported, the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the {@code PrimitiveShadingRateKHR} built-in, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must be 1
  • *
  • If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not contain {@link #VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT}, then the {@code blendEnable} member of the corresponding element of the {@code pAttachments} member of {@code pColorBlendState} must be {@link #VK_FALSE FALSE}
  • *
  • If rasterization is not disabled in the bound graphics pipeline, and neither the {@link AMDMixedAttachmentSamples VK_AMD_mixed_attachment_samples} nor the {@link NVFramebufferMixedSamples VK_NV_framebuffer_mixed_samples} extensions are enabled, then {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} must be the same as the current subpass color and/or depth/stencil attachments
  • *
  • If the bound graphics pipeline was created with both the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic states enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
  • *
  • If the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic state enabled, but not the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must have been called in the current command buffer prior to this draw command, and the {@code pStrides} parameter of {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must not be {@code NULL}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK12#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::viewMask} equal to {@link VkRenderingInfoKHR}{@code ::viewMask}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::colorAttachmentCount} equal to {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a {@code VkFormat} equal to the corresponding element of {@link VkPipelineRenderingCreateInfoKHR}{@code ::pColorAttachmentFormats} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::depthAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::stencilAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentShadingRateAttachmentInfoKHR}{@code ::imageView} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentDensityMapAttachmentInfoEXT}{@code ::imageView} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT}
  • *
  • If the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the corresponding element of the {@code pColorAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline must have been created with a {@link VkGraphicsPipelineCreateInfo}{@code ::renderPass} equal to {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
* *
    *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, any resource written to by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be an unprotected resource
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, pipeline stages other than the framebuffer-space and compute stages in the {@code VkPipeline} object bound to the pipeline bind point used by this command must not write to any resource
  • *
  • If any of the shader stages of the {@code VkPipeline} bound to the pipeline bind point used by this command uses the RayQueryKHR capability, then {@code commandBuffer} must not be a protected command buffer
  • *
* *
    *
  • All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or {@link #VK_NULL_HANDLE NULL_HANDLE} buffers bound
  • *
  • If the nullDescriptor feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
  • For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
  • *
  • (indexSize × (firstIndex + indexCount) + offset) must be less than or equal to the size of the bound index buffer, with {@code indexSize} being based on the type specified by {@code indexType}, where the index buffer, {@code indexType}, and {@code offset} are specified via {@code vkCmdBindIndexBuffer}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called inside of a render pass instance
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryInsideGraphics
* * @param commandBuffer the command buffer into which the command is recorded. * @param indexCount the number of vertices to draw. * @param instanceCount the number of instances to draw. * @param firstIndex the base index within the index buffer. * @param vertexOffset the value added to the vertex index before indexing into the vertex buffer. * @param firstInstance the instance ID of the first instance to draw. */ public static void vkCmdDrawIndexed(VkCommandBuffer commandBuffer, @NativeType("uint32_t") int indexCount, @NativeType("uint32_t") int instanceCount, @NativeType("uint32_t") int firstIndex, @NativeType("int32_t") int vertexOffset, @NativeType("uint32_t") int firstInstance) { long __functionAddress = commandBuffer.getCapabilities().vkCmdDrawIndexed; callPV(commandBuffer.address(), indexCount, instanceCount, firstIndex, vertexOffset, firstInstance, __functionAddress); } // --- [ vkCmdDrawIndirect ] --- /** * Draw primitives with indirect parameters. * *
C Specification
* *

To record a non-indexed indirect drawing command, call:

* *

     * void vkCmdDrawIndirect(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    buffer,
     *     VkDeviceSize                                offset,
     *     uint32_t                                    drawCount,
     *     uint32_t                                    stride);
* *
Description
* *

{@code vkCmdDrawIndirect} behaves similarly to {@link #vkCmdDraw CmdDraw} except that the parameters are read by the device from a buffer during execution. {@code drawCount} draws are executed by the command, with parameters taken from {@code buffer} starting at {@code offset} and increasing by {@code stride} bytes for each successive draw. The parameters of each draw are encoded in an array of {@link VkDrawIndirectCommand} structures. If {@code drawCount} is less than or equal to one, {@code stride} is ignored.

* *
Valid Usage
* *
    *
  • If a {@code VkSampler} created with {@code magFilter} or {@code minFilter} equal to {@link #VK_FILTER_LINEAR FILTER_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkSampler} created with {@code mipmapMode} equal to {@link #VK_SAMPLER_MIPMAP_MODE_LINEAR SAMPLER_MIPMAP_MODE_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkImageView} is accessed using atomic operations as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT}
  • *
  • If a {@code VkImageView} is sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command, then the image view’s format features must contain {@link EXTFilterCubic#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubic} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} with a reduction mode of either {@link VK12#VK_SAMPLER_REDUCTION_MODE_MIN SAMPLER_REDUCTION_MODE_MIN} or {@link VK12#VK_SAMPLER_REDUCTION_MODE_MAX SAMPLER_REDUCTION_MODE_MAX} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering together with minmax filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubicMinmax} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImage} created with a {@link VkImageCreateInfo}{@code ::flags} containing {@link NVCornerSampledImage#VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV IMAGE_CREATE_CORNER_SAMPLED_BIT_NV} sampled as a result of this command must only be sampled using a {@code VkSamplerAddressMode} of {@link #VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being written as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being read as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR}
  • *
  • For each set n that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for set n, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • If the {@code maintenance4} feature is not enabled, then for each push constant that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for push constants, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • Descriptors in each bound descriptor set, specified via {@code vkCmdBindDescriptorSets}, must be valid if they are statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command
  • *
  • A valid pipeline must be bound to the pipeline bind point used by this command
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if the {@link NVInheritedViewportScissor VK_NV_inherited_viewport_scissor} extension is enabled) for {@code commandBuffer}, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
  • *
  • There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in the {@code VkPipeline} object bound to the pipeline bind point used by this command, since that pipeline was bound
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used to sample from any {@code VkImage} with a {@code VkImageView} of the type {@link #VK_IMAGE_VIEW_TYPE_3D IMAGE_VIEW_TYPE_3D}, {@link #VK_IMAGE_VIEW_TYPE_CUBE IMAGE_VIEW_TYPE_CUBE}, {@link #VK_IMAGE_VIEW_TYPE_1D_ARRAY IMAGE_VIEW_TYPE_1D_ARRAY}, {@link #VK_IMAGE_VIEW_TYPE_2D_ARRAY IMAGE_VIEW_TYPE_2D_ARRAY} or {@link #VK_IMAGE_VIEW_TYPE_CUBE_ARRAY IMAGE_VIEW_TYPE_CUBE_ARRAY}, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions with {@code ImplicitLod}, {@code Dref} or {@code Proj} in their name, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions that includes a LOD bias or any offset values, in any shader stage
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, any resource accessed by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be a protected resource
  • *
  • If a {@code VkImageView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the image view’s format
  • *
  • If a {@code VkBufferView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the buffer view’s format
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkImage} objects created with the {@link #VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkBuffer} objects created with the {@link #VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • The current render pass must be compatible with the {@code renderPass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
  • *
  • The subpass index of the current render pass must be equal to the {@code subpass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
  • *
  • Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
  • *
  • Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter
  • *
  • If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to {@link VkPhysicalDeviceMultiviewProperties}{@code ::maxMultiviewInstanceIndex}
  • *
  • If the bound graphics pipeline was created with {@link VkPipelineSampleLocationsStateCreateInfoEXT}{@code ::sampleLocationsEnable} set to {@link #VK_TRUE TRUE} and the current subpass has a depth/stencil attachment, then that attachment must have been created with the {@link EXTSampleLocations#VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT} bit set
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::scissorCount} of the pipeline
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::viewportCount} of the pipeline
  • *
  • If the bound graphics pipeline state was created with both the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic states enabled then both {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} and {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportWScalingStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVClipSpaceWScaling#vkCmdSetViewportWScalingNV CmdSetViewportWScalingNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportShadingRateImageStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVShadingRateImage#vkCmdSetViewportShadingRatePaletteNV CmdSetViewportShadingRatePaletteNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportSwizzleStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportSwizzleStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV}{@code ::exclusiveScissorCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT} dynamic state enabled then {@link EXTExtendedDynamicState#vkCmdSetPrimitiveTopologyEXT CmdSetPrimitiveTopologyEXT} must have been called in the current command buffer prior to this drawing command, and the {@code primitiveTopology} parameter of {@code vkCmdSetPrimitiveTopologyEXT} must be of the same topology class as the pipeline {@link VkPipelineInputAssemblyStateCreateInfo}{@code ::topology} state
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPatchControlPointsEXT CmdSetPatchControlPointsEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetRasterizerDiscardEnableEXT CmdSetRasterizerDiscardEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetDepthBiasEnableEXT CmdSetDepthBiasEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_LOGIC_OP_EXT DYNAMIC_STATE_LOGIC_OP_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetLogicOpEXT CmdSetLogicOpEXT} must have been called in the current command buffer prior to this drawing command and the {@code logicOp} must be a valid {@code VkLogicOp} value
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPrimitiveRestartEnableEXT CmdSetPrimitiveRestartEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the {@code primitiveFragmentShadingRateWithMultipleViewports} limit is not supported, the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the {@code PrimitiveShadingRateKHR} built-in, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must be 1
  • *
  • If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not contain {@link #VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT}, then the {@code blendEnable} member of the corresponding element of the {@code pAttachments} member of {@code pColorBlendState} must be {@link #VK_FALSE FALSE}
  • *
  • If rasterization is not disabled in the bound graphics pipeline, and neither the {@link AMDMixedAttachmentSamples VK_AMD_mixed_attachment_samples} nor the {@link NVFramebufferMixedSamples VK_NV_framebuffer_mixed_samples} extensions are enabled, then {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} must be the same as the current subpass color and/or depth/stencil attachments
  • *
  • If the bound graphics pipeline was created with both the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic states enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
  • *
  • If the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic state enabled, but not the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must have been called in the current command buffer prior to this draw command, and the {@code pStrides} parameter of {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must not be {@code NULL}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK12#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::viewMask} equal to {@link VkRenderingInfoKHR}{@code ::viewMask}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::colorAttachmentCount} equal to {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a {@code VkFormat} equal to the corresponding element of {@link VkPipelineRenderingCreateInfoKHR}{@code ::pColorAttachmentFormats} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::depthAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::stencilAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentShadingRateAttachmentInfoKHR}{@code ::imageView} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentDensityMapAttachmentInfoEXT}{@code ::imageView} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT}
  • *
  • If the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the corresponding element of the {@code pColorAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline must have been created with a {@link VkGraphicsPipelineCreateInfo}{@code ::renderPass} equal to {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
* *
    *
  • All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or {@link #VK_NULL_HANDLE NULL_HANDLE} buffers bound
  • *
  • If the nullDescriptor feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
  • For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
  • *
* *
    *
  • If {@code buffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code buffer} must have been created with the {@link #VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT BUFFER_USAGE_INDIRECT_BUFFER_BIT} bit set
  • *
  • {@code offset} must be a multiple of 4
  • *
  • {@code commandBuffer} must not be a protected command buffer
  • *
* *
    *
  • If the multi-draw indirect feature is not enabled, {@code drawCount} must be 0 or 1
  • *
  • {@code drawCount} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxDrawIndirectCount}
  • *
  • If the drawIndirectFirstInstance feature is not enabled, all the {@code firstInstance} members of the {@link VkDrawIndirectCommand} structures accessed by this command must be 0
  • *
  • If {@code drawCount} is greater than 1, {@code stride} must be a multiple of 4 and must be greater than or equal to {@code sizeof}({@link VkDrawIndirectCommand})
  • *
  • If {@code drawCount} is equal to 1, (offset + sizeof({@link VkDrawIndirectCommand})) must be less than or equal to the size of {@code buffer}
  • *
  • If {@code drawCount} is greater than 1, (stride × (drawCount - 1) + offset + sizeof({@link VkDrawIndirectCommand})) must be less than or equal to the size of {@code buffer}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code buffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called inside of a render pass instance
  • *
  • Both of {@code buffer}, and {@code commandBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryInsideGraphics
* * @param commandBuffer the command buffer into which the command is recorded. * @param buffer the buffer containing draw parameters. * @param offset the byte offset into {@code buffer} where parameters begin. * @param drawCount the number of draws to execute, and can be zero. * @param stride the byte stride between successive sets of draw parameters. */ public static void vkCmdDrawIndirect(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long buffer, @NativeType("VkDeviceSize") long offset, @NativeType("uint32_t") int drawCount, @NativeType("uint32_t") int stride) { long __functionAddress = commandBuffer.getCapabilities().vkCmdDrawIndirect; callPJJV(commandBuffer.address(), buffer, offset, drawCount, stride, __functionAddress); } // --- [ vkCmdDrawIndexedIndirect ] --- /** * Draw primitives with indirect parameters and indexed vertices. * *
C Specification
* *

To record an indexed indirect drawing command, call:

* *

     * void vkCmdDrawIndexedIndirect(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    buffer,
     *     VkDeviceSize                                offset,
     *     uint32_t                                    drawCount,
     *     uint32_t                                    stride);
* *
Description
* *

{@code vkCmdDrawIndexedIndirect} behaves similarly to {@link #vkCmdDrawIndexed CmdDrawIndexed} except that the parameters are read by the device from a buffer during execution. {@code drawCount} draws are executed by the command, with parameters taken from {@code buffer} starting at {@code offset} and increasing by {@code stride} bytes for each successive draw. The parameters of each draw are encoded in an array of {@link VkDrawIndexedIndirectCommand} structures. If {@code drawCount} is less than or equal to one, {@code stride} is ignored.

* *
Valid Usage
* *
    *
  • If a {@code VkSampler} created with {@code magFilter} or {@code minFilter} equal to {@link #VK_FILTER_LINEAR FILTER_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkSampler} created with {@code mipmapMode} equal to {@link #VK_SAMPLER_MIPMAP_MODE_LINEAR SAMPLER_MIPMAP_MODE_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkImageView} is accessed using atomic operations as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT}
  • *
  • If a {@code VkImageView} is sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command, then the image view’s format features must contain {@link EXTFilterCubic#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubic} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} with a reduction mode of either {@link VK12#VK_SAMPLER_REDUCTION_MODE_MIN SAMPLER_REDUCTION_MODE_MIN} or {@link VK12#VK_SAMPLER_REDUCTION_MODE_MAX SAMPLER_REDUCTION_MODE_MAX} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering together with minmax filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubicMinmax} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImage} created with a {@link VkImageCreateInfo}{@code ::flags} containing {@link NVCornerSampledImage#VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV IMAGE_CREATE_CORNER_SAMPLED_BIT_NV} sampled as a result of this command must only be sampled using a {@code VkSamplerAddressMode} of {@link #VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being written as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being read as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR}
  • *
  • For each set n that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for set n, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • If the {@code maintenance4} feature is not enabled, then for each push constant that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for push constants, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • Descriptors in each bound descriptor set, specified via {@code vkCmdBindDescriptorSets}, must be valid if they are statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command
  • *
  • A valid pipeline must be bound to the pipeline bind point used by this command
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if the {@link NVInheritedViewportScissor VK_NV_inherited_viewport_scissor} extension is enabled) for {@code commandBuffer}, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
  • *
  • There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in the {@code VkPipeline} object bound to the pipeline bind point used by this command, since that pipeline was bound
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used to sample from any {@code VkImage} with a {@code VkImageView} of the type {@link #VK_IMAGE_VIEW_TYPE_3D IMAGE_VIEW_TYPE_3D}, {@link #VK_IMAGE_VIEW_TYPE_CUBE IMAGE_VIEW_TYPE_CUBE}, {@link #VK_IMAGE_VIEW_TYPE_1D_ARRAY IMAGE_VIEW_TYPE_1D_ARRAY}, {@link #VK_IMAGE_VIEW_TYPE_2D_ARRAY IMAGE_VIEW_TYPE_2D_ARRAY} or {@link #VK_IMAGE_VIEW_TYPE_CUBE_ARRAY IMAGE_VIEW_TYPE_CUBE_ARRAY}, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions with {@code ImplicitLod}, {@code Dref} or {@code Proj} in their name, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions that includes a LOD bias or any offset values, in any shader stage
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, any resource accessed by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be a protected resource
  • *
  • If a {@code VkImageView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the image view’s format
  • *
  • If a {@code VkBufferView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the buffer view’s format
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkImage} objects created with the {@link #VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkBuffer} objects created with the {@link #VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • The current render pass must be compatible with the {@code renderPass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
  • *
  • The subpass index of the current render pass must be equal to the {@code subpass} member of the {@link VkGraphicsPipelineCreateInfo} structure specified when creating the {@code VkPipeline} bound to {@link #VK_PIPELINE_BIND_POINT_GRAPHICS PIPELINE_BIND_POINT_GRAPHICS}
  • *
  • Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
  • *
  • Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter
  • *
  • If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to {@link VkPhysicalDeviceMultiviewProperties}{@code ::maxMultiviewInstanceIndex}
  • *
  • If the bound graphics pipeline was created with {@link VkPipelineSampleLocationsStateCreateInfoEXT}{@code ::sampleLocationsEnable} set to {@link #VK_TRUE TRUE} and the current subpass has a depth/stencil attachment, then that attachment must have been created with the {@link EXTSampleLocations#VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT} bit set
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::scissorCount} of the pipeline
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} dynamic state enabled, but not the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT} must match the {@link VkPipelineViewportStateCreateInfo}{@code ::viewportCount} of the pipeline
  • *
  • If the bound graphics pipeline state was created with both the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic states enabled then both {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} and {@link EXTExtendedDynamicState#vkCmdSetScissorWithCountEXT CmdSetScissorWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must match the {@code scissorCount} parameter of {@code vkCmdSetScissorWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportWScalingStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVClipSpaceWScaling#vkCmdSetViewportWScalingNV CmdSetViewportWScalingNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, but not the {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic state enabled, then the bound graphics pipeline must have been created with {@link VkPipelineViewportShadingRateImageStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} and {@link NVShadingRateImage#VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV} dynamic states enabled then the {@code viewportCount} parameter in the last call to {@link NVShadingRateImage#vkCmdSetViewportShadingRatePaletteNV CmdSetViewportShadingRatePaletteNV} must be greater than or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportSwizzleStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportSwizzleStateCreateInfoNV}{@code ::viewportCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled and a {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV} structure chained from {@code VkPipelineVieportCreateInfo}, then the bound graphics pipeline must have been created with {@link VkPipelineViewportExclusiveScissorStateCreateInfoNV}{@code ::exclusiveScissorCount} greater or equal to the {@code viewportCount} parameter in the last call to {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT} dynamic state enabled then {@link EXTExtendedDynamicState#vkCmdSetPrimitiveTopologyEXT CmdSetPrimitiveTopologyEXT} must have been called in the current command buffer prior to this drawing command, and the {@code primitiveTopology} parameter of {@code vkCmdSetPrimitiveTopologyEXT} must be of the same topology class as the pipeline {@link VkPipelineInputAssemblyStateCreateInfo}{@code ::topology} state
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPatchControlPointsEXT CmdSetPatchControlPointsEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetRasterizerDiscardEnableEXT CmdSetRasterizerDiscardEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetDepthBiasEnableEXT CmdSetDepthBiasEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_LOGIC_OP_EXT DYNAMIC_STATE_LOGIC_OP_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetLogicOpEXT CmdSetLogicOpEXT} must have been called in the current command buffer prior to this drawing command and the {@code logicOp} must be a valid {@code VkLogicOp} value
  • *
  • If the bound graphics pipeline state was created with the {@link EXTExtendedDynamicState2#VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT} dynamic state enabled then {@link EXTExtendedDynamicState2#vkCmdSetPrimitiveRestartEnableEXT CmdSetPrimitiveRestartEnableEXT} must have been called in the current command buffer prior to this drawing command
  • *
  • If the {@code primitiveFragmentShadingRateWithMultipleViewports} limit is not supported, the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT} dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the {@code PrimitiveShadingRateKHR} built-in, then {@link EXTExtendedDynamicState#vkCmdSetViewportWithCountEXT CmdSetViewportWithCountEXT} must have been called in the current command buffer prior to this drawing command, and the {@code viewportCount} parameter of {@code vkCmdSetViewportWithCountEXT} must be 1
  • *
  • If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not contain {@link #VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT}, then the {@code blendEnable} member of the corresponding element of the {@code pAttachments} member of {@code pColorBlendState} must be {@link #VK_FALSE FALSE}
  • *
  • If rasterization is not disabled in the bound graphics pipeline, and neither the {@link AMDMixedAttachmentSamples VK_AMD_mixed_attachment_samples} nor the {@link NVFramebufferMixedSamples VK_NV_framebuffer_mixed_samples} extensions are enabled, then {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} must be the same as the current subpass color and/or depth/stencil attachments
  • *
  • If the bound graphics pipeline was created with both the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} and {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic states enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
  • *
  • If the bound graphics pipeline was created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic state enabled, but not the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must have been called in the current command buffer prior to this draw command, and the {@code pStrides} parameter of {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} must not be {@code NULL}
  • *
  • If the bound graphics pipeline state was created with the {@link EXTVertexInputDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} dynamic state enabled, then {@link EXTVertexInputDynamicState#vkCmdSetVertexInputEXT CmdSetVertexInputEXT} must have been called in the current command buffer prior to this draw command
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pDepthAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pDepthAttachment} is {@link VK12#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL}, this command must not write any values to the depth attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code imageView} member of {@code pStencilAttachment} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, and the {@code layout} member of {@code pStencilAttachment} is {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL}, this command must not write any values to the stencil attachment
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::viewMask} equal to {@link VkRenderingInfoKHR}{@code ::viewMask}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound graphics pipeline must have been created with a {@link VkPipelineRenderingCreateInfoKHR}{@code ::colorAttachmentCount} equal to {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a {@code VkFormat} equal to the corresponding element of {@link VkPipelineRenderingCreateInfoKHR}{@code ::pColorAttachmentFormats} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::depthAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineRenderingCreateInfoKHR}{@code ::stencilAttachmentFormat} used to create the currently bound graphics pipeline must be equal to the {@code VkFormat} used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentShadingRateAttachmentInfoKHR}{@code ::imageView} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR}
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and {@link VkRenderingFragmentDensityMapAttachmentInfoEXT}{@code ::imageView} was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the currently bound graphics pipeline must have been created with {@link KHRDynamicRendering#VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT}
  • *
  • If the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the corresponding element of the {@code pColorAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created with a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} with a {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter greater than 0, then each element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} array with a {@code imageView} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE} must have been created with a sample count equal to the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline was created without a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, and {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView was not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkPipelineMultisampleStateCreateInfo}{@code ::rasterizationSamples} used to create the currently bound graphics pipeline must be equal to the sample count used to create {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→pname}:imageView
  • *
  • If the current render pass instance was begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the currently bound pipeline must have been created with a {@link VkGraphicsPipelineCreateInfo}{@code ::renderPass} equal to {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
* *
    *
  • All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or {@link #VK_NULL_HANDLE NULL_HANDLE} buffers bound
  • *
  • If the nullDescriptor feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
  • For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
  • *
* *
    *
  • If {@code buffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code buffer} must have been created with the {@link #VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT BUFFER_USAGE_INDIRECT_BUFFER_BIT} bit set
  • *
  • {@code offset} must be a multiple of 4
  • *
  • {@code commandBuffer} must not be a protected command buffer
  • *
* *
    *
  • If the multi-draw indirect feature is not enabled, {@code drawCount} must be 0 or 1
  • *
  • {@code drawCount} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxDrawIndirectCount}
  • *
  • If {@code drawCount} is greater than 1, {@code stride} must be a multiple of 4 and must be greater than or equal to {@code sizeof}({@link VkDrawIndexedIndirectCommand})
  • *
  • If the drawIndirectFirstInstance feature is not enabled, all the {@code firstInstance} members of the {@link VkDrawIndexedIndirectCommand} structures accessed by this command must be 0
  • *
  • If {@code drawCount} is equal to 1, (offset + sizeof({@link VkDrawIndexedIndirectCommand})) must be less than or equal to the size of {@code buffer}
  • *
  • If {@code drawCount} is greater than 1, (stride × (drawCount - 1) + offset + sizeof({@link VkDrawIndexedIndirectCommand})) must be less than or equal to the size of {@code buffer}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code buffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called inside of a render pass instance
  • *
  • Both of {@code buffer}, and {@code commandBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryInsideGraphics
* * @param commandBuffer the command buffer into which the command is recorded. * @param buffer the buffer containing draw parameters. * @param offset the byte offset into {@code buffer} where parameters begin. * @param drawCount the number of draws to execute, and can be zero. * @param stride the byte stride between successive sets of draw parameters. */ public static void vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long buffer, @NativeType("VkDeviceSize") long offset, @NativeType("uint32_t") int drawCount, @NativeType("uint32_t") int stride) { long __functionAddress = commandBuffer.getCapabilities().vkCmdDrawIndexedIndirect; callPJJV(commandBuffer.address(), buffer, offset, drawCount, stride, __functionAddress); } // --- [ vkCmdDispatch ] --- /** * Dispatch compute work items. * *
C Specification
* *

To record a dispatch, call:

* *

     * void vkCmdDispatch(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    groupCountX,
     *     uint32_t                                    groupCountY,
     *     uint32_t                                    groupCountZ);
* *
Description
* *

When the command is executed, a global workgroup consisting of groupCountX × groupCountY × groupCountZ local workgroups is assembled.

* *
Valid Usage
* *
    *
  • If a {@code VkSampler} created with {@code magFilter} or {@code minFilter} equal to {@link #VK_FILTER_LINEAR FILTER_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkSampler} created with {@code mipmapMode} equal to {@link #VK_SAMPLER_MIPMAP_MODE_LINEAR SAMPLER_MIPMAP_MODE_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkImageView} is accessed using atomic operations as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT}
  • *
  • If a {@code VkImageView} is sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command, then the image view’s format features must contain {@link EXTFilterCubic#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubic} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} with a reduction mode of either {@link VK12#VK_SAMPLER_REDUCTION_MODE_MIN SAMPLER_REDUCTION_MODE_MIN} or {@link VK12#VK_SAMPLER_REDUCTION_MODE_MAX SAMPLER_REDUCTION_MODE_MAX} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering together with minmax filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubicMinmax} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImage} created with a {@link VkImageCreateInfo}{@code ::flags} containing {@link NVCornerSampledImage#VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV IMAGE_CREATE_CORNER_SAMPLED_BIT_NV} sampled as a result of this command must only be sampled using a {@code VkSamplerAddressMode} of {@link #VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being written as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being read as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR}
  • *
  • For each set n that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for set n, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • If the {@code maintenance4} feature is not enabled, then for each push constant that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for push constants, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • Descriptors in each bound descriptor set, specified via {@code vkCmdBindDescriptorSets}, must be valid if they are statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command
  • *
  • A valid pipeline must be bound to the pipeline bind point used by this command
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if the {@link NVInheritedViewportScissor VK_NV_inherited_viewport_scissor} extension is enabled) for {@code commandBuffer}, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
  • *
  • There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in the {@code VkPipeline} object bound to the pipeline bind point used by this command, since that pipeline was bound
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used to sample from any {@code VkImage} with a {@code VkImageView} of the type {@link #VK_IMAGE_VIEW_TYPE_3D IMAGE_VIEW_TYPE_3D}, {@link #VK_IMAGE_VIEW_TYPE_CUBE IMAGE_VIEW_TYPE_CUBE}, {@link #VK_IMAGE_VIEW_TYPE_1D_ARRAY IMAGE_VIEW_TYPE_1D_ARRAY}, {@link #VK_IMAGE_VIEW_TYPE_2D_ARRAY IMAGE_VIEW_TYPE_2D_ARRAY} or {@link #VK_IMAGE_VIEW_TYPE_CUBE_ARRAY IMAGE_VIEW_TYPE_CUBE_ARRAY}, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions with {@code ImplicitLod}, {@code Dref} or {@code Proj} in their name, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions that includes a LOD bias or any offset values, in any shader stage
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, any resource accessed by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be a protected resource
  • *
  • If a {@code VkImageView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the image view’s format
  • *
  • If a {@code VkBufferView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the buffer view’s format
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkImage} objects created with the {@link #VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkBuffer} objects created with the {@link #VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
* *
    *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, any resource written to by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be an unprotected resource
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, pipeline stages other than the framebuffer-space and compute stages in the {@code VkPipeline} object bound to the pipeline bind point used by this command must not write to any resource
  • *
  • If any of the shader stages of the {@code VkPipeline} bound to the pipeline bind point used by this command uses the RayQueryKHR capability, then {@code commandBuffer} must not be a protected command buffer
  • *
  • {@code groupCountX} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxComputeWorkGroupCount}[0]
  • *
  • {@code groupCountY} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxComputeWorkGroupCount}[1]
  • *
  • {@code groupCountZ} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxComputeWorkGroupCount}[2]
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideCompute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param groupCountX the number of local workgroups to dispatch in the X dimension. * @param groupCountY the number of local workgroups to dispatch in the Y dimension. * @param groupCountZ the number of local workgroups to dispatch in the Z dimension. */ public static void vkCmdDispatch(VkCommandBuffer commandBuffer, @NativeType("uint32_t") int groupCountX, @NativeType("uint32_t") int groupCountY, @NativeType("uint32_t") int groupCountZ) { long __functionAddress = commandBuffer.getCapabilities().vkCmdDispatch; callPV(commandBuffer.address(), groupCountX, groupCountY, groupCountZ, __functionAddress); } // --- [ vkCmdDispatchIndirect ] --- /** * Dispatch compute work items with indirect parameters. * *
C Specification
* *

To record an indirect dispatching command, call:

* *

     * void vkCmdDispatchIndirect(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    buffer,
     *     VkDeviceSize                                offset);
* *
Description
* *

{@code vkCmdDispatchIndirect} behaves similarly to {@link #vkCmdDispatch CmdDispatch} except that the parameters are read by the device from a buffer during execution. The parameters of the dispatch are encoded in a {@link VkDispatchIndirectCommand} structure taken from {@code buffer} starting at {@code offset}.

* *
Valid Usage
* *
    *
  • If a {@code VkSampler} created with {@code magFilter} or {@code minFilter} equal to {@link #VK_FILTER_LINEAR FILTER_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkSampler} created with {@code mipmapMode} equal to {@link #VK_SAMPLER_MIPMAP_MODE_LINEAR SAMPLER_MIPMAP_MODE_LINEAR} and {@code compareEnable} equal to {@link #VK_FALSE FALSE} is used to sample a {@code VkImageView} as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If a {@code VkImageView} is accessed using atomic operations as a result of this command, then the image view’s format features must contain {@link #VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT}
  • *
  • If a {@code VkImageView} is sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command, then the image view’s format features must contain {@link EXTFilterCubic#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubic} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImageView} being sampled with {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT} with a reduction mode of either {@link VK12#VK_SAMPLER_REDUCTION_MODE_MIN SAMPLER_REDUCTION_MODE_MIN} or {@link VK12#VK_SAMPLER_REDUCTION_MODE_MAX SAMPLER_REDUCTION_MODE_MAX} as a result of this command must have a {@code VkImageViewType} and format that supports cubic filtering together with minmax filtering, as specified by {@link VkFilterCubicImageViewImageFormatPropertiesEXT}{@code ::filterCubicMinmax} returned by {@code vkGetPhysicalDeviceImageFormatProperties2}
  • *
  • Any {@code VkImage} created with a {@link VkImageCreateInfo}{@code ::flags} containing {@link NVCornerSampledImage#VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV IMAGE_CREATE_CORNER_SAMPLED_BIT_NV} sampled as a result of this command must only be sampled using a {@code VkSamplerAddressMode} of {@link #VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being written as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR}
  • *
  • Any {@code VkImageView} or {@code VkBufferView} being read as a storage image or storage texel buffer where the image format field of the {@code OpTypeImage} is {@code Unknown} must have image format features that support {@link KHRFormatFeatureFlags2#VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR}
  • *
  • For each set n that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for set n, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • If the {@code maintenance4} feature is not enabled, then for each push constant that is statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with a {@code VkPipelineLayout} that is compatible for push constants, with the {@code VkPipelineLayout} used to create the current {@code VkPipeline}, as described in Pipeline Layout Compatibility
  • *
  • Descriptors in each bound descriptor set, specified via {@code vkCmdBindDescriptorSets}, must be valid if they are statically used by the {@code VkPipeline} bound to the pipeline bind point used by this command
  • *
  • A valid pipeline must be bound to the pipeline bind point used by this command
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if the {@link NVInheritedViewportScissor VK_NV_inherited_viewport_scissor} extension is enabled) for {@code commandBuffer}, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
  • *
  • There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in the {@code VkPipeline} object bound to the pipeline bind point used by this command, since that pipeline was bound
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used to sample from any {@code VkImage} with a {@code VkImageView} of the type {@link #VK_IMAGE_VIEW_TYPE_3D IMAGE_VIEW_TYPE_3D}, {@link #VK_IMAGE_VIEW_TYPE_CUBE IMAGE_VIEW_TYPE_CUBE}, {@link #VK_IMAGE_VIEW_TYPE_1D_ARRAY IMAGE_VIEW_TYPE_1D_ARRAY}, {@link #VK_IMAGE_VIEW_TYPE_2D_ARRAY IMAGE_VIEW_TYPE_2D_ARRAY} or {@link #VK_IMAGE_VIEW_TYPE_CUBE_ARRAY IMAGE_VIEW_TYPE_CUBE_ARRAY}, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions with {@code ImplicitLod}, {@code Dref} or {@code Proj} in their name, in any shader stage
  • *
  • If the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a {@code VkSampler} object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V {@code OpImageSample*} or {@code OpImageSparseSample*} instructions that includes a LOD bias or any offset values, in any shader stage
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If the robust buffer access feature is not enabled, and if the {@code VkPipeline} object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, any resource accessed by the {@code VkPipeline} object bound to the pipeline bind point used by this command must not be a protected resource
  • *
  • If a {@code VkImageView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the image view’s format
  • *
  • If a {@code VkBufferView} is accessed using {@code OpImageWrite} as a result of this command, then the {@code Type} of the {@code Texel} operand of that instruction must have at least as many components as the buffer view’s format
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkImageView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a 64-bit component width is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 64
  • *
  • If a {@code VkBufferView} with a {@code VkFormat} that has a component width less than 64-bit is accessed as a result of this command, the {@code SampledType} of the {@code OpTypeImage} operand of that instruction must have a {@code Width} of 32
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkImage} objects created with the {@link #VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT IMAGE_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
  • If the {@code sparseImageInt64Atomics} feature is not enabled, {@code VkBuffer} objects created with the {@link #VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} flag must not be accessed by atomic instructions through an {@code OpTypeImage} with a {@code SampledType} with a {@code Width} of 64 by this command
  • *
* *
    *
  • If {@code buffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code buffer} must have been created with the {@link #VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT BUFFER_USAGE_INDIRECT_BUFFER_BIT} bit set
  • *
  • {@code offset} must be a multiple of 4
  • *
  • {@code commandBuffer} must not be a protected command buffer
  • *
  • The sum of {@code offset} and the size of {@link VkDispatchIndirectCommand} must be less than or equal to the size of {@code buffer}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code buffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • Both of {@code buffer}, and {@code commandBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideCompute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param buffer the buffer containing dispatch parameters. * @param offset the byte offset into {@code buffer} where parameters begin. */ public static void vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long buffer, @NativeType("VkDeviceSize") long offset) { long __functionAddress = commandBuffer.getCapabilities().vkCmdDispatchIndirect; callPJJV(commandBuffer.address(), buffer, offset, __functionAddress); } // --- [ vkCmdCopyBuffer ] --- /** * Unsafe version of: {@link #vkCmdCopyBuffer CmdCopyBuffer} * * @param regionCount the number of regions to copy. */ public static void nvkCmdCopyBuffer(VkCommandBuffer commandBuffer, long srcBuffer, long dstBuffer, int regionCount, long pRegions) { long __functionAddress = commandBuffer.getCapabilities().vkCmdCopyBuffer; callPJJPV(commandBuffer.address(), srcBuffer, dstBuffer, regionCount, pRegions, __functionAddress); } /** * Copy data between buffer regions. * *
C Specification
* *

To copy data between buffer objects, call:

* *

     * void vkCmdCopyBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    srcBuffer,
     *     VkBuffer                                    dstBuffer,
     *     uint32_t                                    regionCount,
     *     const VkBufferCopy*                         pRegions);
* *
Description
* *

Each region in {@code pRegions} is copied from the source buffer to the same region of the destination buffer. {@code srcBuffer} and {@code dstBuffer} can be the same buffer or alias the same memory, but the resulting values are undefined if the copy regions overlap in memory.

* *
Valid Usage
* *
    *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code srcBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be an unprotected buffer
  • *
* *
    *
  • The {@code srcOffset} member of each element of {@code pRegions} must be less than the size of {@code srcBuffer}
  • *
  • The {@code dstOffset} member of each element of {@code pRegions} must be less than the size of {@code dstBuffer}
  • *
  • The {@code size} member of each element of {@code pRegions} must be less than or equal to the size of {@code srcBuffer} minus {@code srcOffset}
  • *
  • The {@code size} member of each element of {@code pRegions} must be less than or equal to the size of {@code dstBuffer} minus {@code dstOffset}
  • *
  • The union of the source regions, and the union of the destination regions, specified by the elements of {@code pRegions}, must not overlap in memory
  • *
  • {@code srcBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_SRC_BIT BUFFER_USAGE_TRANSFER_SRC_BIT} usage flag
  • *
  • If {@code srcBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code srcBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code pRegions} must be a valid pointer to an array of {@code regionCount} valid {@link VkBufferCopy} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code regionCount} must be greater than 0
  • *
  • Each of {@code commandBuffer}, {@code dstBuffer}, and {@code srcBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* *
See Also
* *

{@link VkBufferCopy}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param srcBuffer the source buffer. * @param dstBuffer the destination buffer. * @param pRegions a pointer to an array of {@link VkBufferCopy} structures specifying the regions to copy. */ public static void vkCmdCopyBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long srcBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkBufferCopy const *") VkBufferCopy.Buffer pRegions) { nvkCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, pRegions.remaining(), pRegions.address()); } // --- [ vkCmdCopyImage ] --- /** * Unsafe version of: {@link #vkCmdCopyImage CmdCopyImage} * * @param regionCount the number of regions to copy. */ public static void nvkCmdCopyImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, int regionCount, long pRegions) { long __functionAddress = commandBuffer.getCapabilities().vkCmdCopyImage; callPJJPV(commandBuffer.address(), srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, __functionAddress); } /** * Copy data between images. * *
C Specification
* *

To copy data between image objects, call:

* *

     * void vkCmdCopyImage(
     *     VkCommandBuffer                             commandBuffer,
     *     VkImage                                     srcImage,
     *     VkImageLayout                               srcImageLayout,
     *     VkImage                                     dstImage,
     *     VkImageLayout                               dstImageLayout,
     *     uint32_t                                    regionCount,
     *     const VkImageCopy*                          pRegions);
* *
Description
* *

Each region in {@code pRegions} is copied from the source image to the same region of the destination image. {@code srcImage} and {@code dstImage} can be the same image or alias the same memory.

* *

The formats of {@code srcImage} and {@code dstImage} must be compatible. Formats are compatible if they share the same class, as shown in the Compatible Formats table. Depth/stencil formats must match exactly.

* *

If either {@code srcImage} or {@code dstImage} has a multi-planar format, regions of each plane to be copied must be specified separately using the {@code srcSubresource} and {@code dstSubresource} members of the {@link VkImageCopy} structure. In this case, the {@code aspectMask} of the {@code srcSubresource} or {@code dstSubresource} that refers to the multi-planar image must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT}, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}, or {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT}. For the purposes of {@code vkCmdCopyImage}, each plane of a multi-planar image is treated as having the format listed in Compatible formats of planes of multi-planar formats for the plane identified by the {@code aspectMask} of the corresponding subresource. This applies both to {@code VkFormat} and to coordinates used in the copy, which correspond to texels in the plane rather than how these texels map to coordinates in the image as a whole.

* *
Note
* *

For example, the {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT} plane of a {@link VK11#VK_FORMAT_G8_B8R8_2PLANE_420_UNORM FORMAT_G8_B8R8_2PLANE_420_UNORM} image is compatible with an image of format {@link #VK_FORMAT_R8G8_UNORM FORMAT_R8G8_UNORM} and (less usefully) with the {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} plane of an image of format {@link VK11#VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16}, as each texel is 2 bytes in size.

*
* *

{@code vkCmdCopyImage} allows copying between size-compatible compressed and uncompressed internal formats. Formats are size-compatible if the texel block size of the uncompressed format is equal to the texel block size of the compressed format. Such a copy does not perform on-the-fly compression or decompression. When copying from an uncompressed format to a compressed format, each texel of uncompressed data of the source image is copied as a raw value to the corresponding compressed texel block of the destination image. When copying from a compressed format to an uncompressed format, each compressed texel block of the source image is copied as a raw value to the corresponding texel of uncompressed data in the destination image. Thus, for example, it is legal to copy between a 128-bit uncompressed format and a compressed format which has a 128-bit sized compressed texel block representing 4×4 texels (using 8 bits per texel), or between a 64-bit uncompressed format and a compressed format which has a 64-bit sized compressed texel block representing 4×4 texels (using 4 bits per texel).

* *

When copying between compressed and uncompressed formats the {@code extent} members represent the texel dimensions of the source image and not the destination. When copying from a compressed image to an uncompressed image the image texel dimensions written to the uncompressed image will be source extent divided by the compressed texel block dimensions. When copying from an uncompressed image to a compressed image the image texel dimensions written to the compressed image will be the source extent multiplied by the compressed texel block dimensions. In both cases the number of bytes read and the number of bytes written will be identical.

* *

Copying to or from block-compressed images is typically done in multiples of the compressed texel block size. For this reason the {@code extent} must be a multiple of the compressed texel block dimension. There is one exception to this rule which is required to handle compressed images created with dimensions that are not a multiple of the compressed texel block dimensions: if the {@code srcImage} is compressed, then:

* *
    *
  • If {@code extent.width} is not a multiple of the compressed texel block width, then (extent.width + srcOffset.x) must equal the image subresource width.
  • *
  • If {@code extent.height} is not a multiple of the compressed texel block height, then (extent.height + srcOffset.y) must equal the image subresource height.
  • *
  • If {@code extent.depth} is not a multiple of the compressed texel block depth, then (extent.depth + srcOffset.z) must equal the image subresource depth.
  • *
* *

Similarly, if the {@code dstImage} is compressed, then:

* *
    *
  • If {@code extent.width} is not a multiple of the compressed texel block width, then (extent.width + dstOffset.x) must equal the image subresource width.
  • *
  • If {@code extent.height} is not a multiple of the compressed texel block height, then (extent.height + dstOffset.y) must equal the image subresource height.
  • *
  • If {@code extent.depth} is not a multiple of the compressed texel block depth, then (extent.depth + dstOffset.z) must equal the image subresource depth.
  • *
* *

This allows the last compressed texel block of the image in each non-multiple dimension to be included as a source or destination of the copy.

* *

“{@code _422}” image formats that are not multi-planar are treated as having a 2×1 compressed texel block for the purposes of these rules.

* *

{@code vkCmdCopyImage} can be used to copy image data between multisample images, but both images must have the same number of samples.

* *
Valid Usage
* *
    *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code srcImage} must not be a protected image
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be an unprotected image
  • *
* *
    *
  • The union of all source regions, and the union of all destination regions, specified by the elements of {@code pRegions}, must not overlap in memory
  • *
  • The format features of {@code srcImage} must contain {@link VK11#VK_FORMAT_FEATURE_TRANSFER_SRC_BIT FORMAT_FEATURE_TRANSFER_SRC_BIT}
  • *
  • {@code srcImage} must have been created with {@link #VK_IMAGE_USAGE_TRANSFER_SRC_BIT IMAGE_USAGE_TRANSFER_SRC_BIT} usage flag
  • *
  • If {@code srcImage} is non-sparse then the image or disjoint plane to be copied must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code srcImageLayout} must specify the layout of the image subresources of {@code srcImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code srcImageLayout} must be {@link #VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL}, {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}, or {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}
  • *
  • The format features of {@code dstImage} must contain {@link VK11#VK_FORMAT_FEATURE_TRANSFER_DST_BIT FORMAT_FEATURE_TRANSFER_DST_BIT}
  • *
  • {@code dstImage} must have been created with {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstImage} is non-sparse then the image or disjoint plane that is the destination of the copy must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstImageLayout} must specify the layout of the image subresources of {@code dstImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code dstImageLayout} must be {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL}, {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}, or {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}
  • *
  • If the {@code VkFormat} of each of {@code srcImage} and {@code dstImage} is not a multi-planar format, the {@code VkFormat} of each of {@code srcImage} and {@code dstImage} must be compatible, as defined above
  • *
  • In a copy to or from a plane of a multi-planar image, the {@code VkFormat} of the image and plane must be compatible according to the description of compatible planes for the plane being copied
  • *
  • The sample count of {@code srcImage} and {@code dstImage} must match
  • *
  • The {@code srcSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The {@code dstSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • The {@code srcOffset} and {@code extent} members of each element of {@code pRegions} must respect the image transfer granularity requirements of {@code commandBuffer}’s command pool’s queue family, as described in {@link VkQueueFamilyProperties}
  • *
  • The {@code dstOffset} and {@code extent} members of each element of {@code pRegions} must respect the image transfer granularity requirements of {@code commandBuffer}’s command pool’s queue family, as described in {@link VkQueueFamilyProperties}
  • *
  • {@code dstImage} and {@code srcImage} must not have been created with {@code flags} containing {@link EXTFragmentDensityMap#VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT IMAGE_CREATE_SUBSAMPLED_BIT_EXT}
  • *
  • If neither {@code srcImage} nor {@code dstImage} has a multi-planar image format then for each element of {@code pRegions}, {@code srcSubresource.aspectMask} and {@code dstSubresource.aspectMask} must match
  • *
  • If {@code srcImage} has a {@code VkFormat} with two planes then for each element of {@code pRegions}, {@code srcSubresource.aspectMask} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} or {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}
  • *
  • If {@code srcImage} has a {@code VkFormat} with three planes then for each element of {@code pRegions}, {@code srcSubresource.aspectMask} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT}, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}, or {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT}
  • *
  • If {@code dstImage} has a {@code VkFormat} with two planes then for each element of {@code pRegions}, {@code dstSubresource.aspectMask} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT} or {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}
  • *
  • If {@code dstImage} has a {@code VkFormat} with three planes then for each element of {@code pRegions}, {@code dstSubresource.aspectMask} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT}, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}, or {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT}
  • *
  • If {@code srcImage} has a multi-planar image format and the {@code dstImage} does not have a multi-planar image format, then for each element of {@code pRegions}, {@code dstSubresource.aspectMask} must be {@link #VK_IMAGE_ASPECT_COLOR_BIT IMAGE_ASPECT_COLOR_BIT}
  • *
  • If {@code dstImage} has a multi-planar image format and the {@code srcImage} does not have a multi-planar image format, then for each element of {@code pRegions}, {@code srcSubresource.aspectMask} must be {@link #VK_IMAGE_ASPECT_COLOR_BIT IMAGE_ASPECT_COLOR_BIT}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, then for each element of {@code pRegions}, {@code srcSubresource.baseArrayLayer} must be 0 and {@code srcSubresource.layerCount} must be 1
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, then for each element of {@code pRegions}, {@code dstSubresource.baseArrayLayer} must be 0 and {@code dstSubresource.layerCount} must be 1
  • *
  • For each element of {@code pRegions}, {@code srcSubresource.aspectMask} must specify aspects present in {@code srcImage}
  • *
  • For each element of {@code pRegions}, {@code dstSubresource.aspectMask} must specify aspects present in {@code dstImage}
  • *
  • For each element of {@code pRegions}, {@code srcOffset.x} and (extent.width + srcOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • For each element of {@code pRegions}, {@code srcOffset.y} and (extent.height + srcOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code srcOffset.y} must be 0 and {@code extent.height} must be 1
  • *
  • For each element of {@code pRegions}, {@code srcOffset.z} and (extent.depth + srcOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code srcOffset.z} must be 0 and {@code extent.depth} must be 1
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code dstOffset.z} must be 0 and {@code extent.depth} must be 1
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code srcOffset.z} must be 0
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code dstOffset.z} must be 0
  • *
  • If {@code srcImage} and {@code dstImage} are both of type {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code extent.depth} must be 1
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, and {@code dstImage} is of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, then for each element of {@code pRegions}, {@code extent.depth} must equal {@code srcSubresource.layerCount}
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, and {@code srcImage} is of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, then for each element of {@code pRegions}, {@code extent.depth} must equal {@code dstSubresource.layerCount}
  • *
  • For each element of {@code pRegions}, {@code dstOffset.x} and (extent.width + dstOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • For each element of {@code pRegions}, {@code dstOffset.y} and (extent.height + dstOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code dstOffset.y} must be 0 and {@code extent.height} must be 1
  • *
  • For each element of {@code pRegions}, {@code dstOffset.z} and (extent.depth + dstOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code srcImage} is a blocked image, then for each element of {@code pRegions}, all members of {@code srcOffset} must be a multiple of the corresponding dimensions of the compressed texel block
  • *
  • If {@code srcImage} is a blocked image, then for each element of {@code pRegions}, {@code extent.width} must be a multiple of the compressed texel block width or (extent.width + srcOffset.x) must equal the width of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is a blocked image, then for each element of {@code pRegions}, {@code extent.height} must be a multiple of the compressed texel block height or (extent.height + srcOffset.y) must equal the height of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is a blocked image, then for each element of {@code pRegions}, {@code extent.depth} must be a multiple of the compressed texel block depth or (extent.depth + srcOffset.z) must equal the depth of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code dstImage} is a blocked image, then for each element of {@code pRegions}, all members of {@code dstOffset} must be a multiple of the corresponding dimensions of the compressed texel block
  • *
  • If {@code dstImage} is a blocked image, then for each element of {@code pRegions}, {@code extent.width} must be a multiple of the compressed texel block width or (extent.width + dstOffset.x) must equal the width of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is a blocked image, then for each element of {@code pRegions}, {@code extent.height} must be a multiple of the compressed texel block height or (extent.height + dstOffset.y) must equal the height of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is a blocked image, then for each element of {@code pRegions}, {@code extent.depth} must be a multiple of the compressed texel block depth or (extent.depth + dstOffset.z) must equal the depth of the specified {@code dstSubresource} of {@code dstImage}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code srcImage} must be a valid {@code VkImage} handle
  • *
  • {@code srcImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code dstImage} must be a valid {@code VkImage} handle
  • *
  • {@code dstImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pRegions} must be a valid pointer to an array of {@code regionCount} valid {@link VkImageCopy} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code regionCount} must be greater than 0
  • *
  • Each of {@code commandBuffer}, {@code dstImage}, and {@code srcImage} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* *
See Also
* *

{@link VkImageCopy}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param srcImage the source image. * @param srcImageLayout the current layout of the source image subresource. * @param dstImage the destination image. * @param dstImageLayout the current layout of the destination image subresource. * @param pRegions a pointer to an array of {@link VkImageCopy} structures specifying the regions to copy. */ public static void vkCmdCopyImage(VkCommandBuffer commandBuffer, @NativeType("VkImage") long srcImage, @NativeType("VkImageLayout") int srcImageLayout, @NativeType("VkImage") long dstImage, @NativeType("VkImageLayout") int dstImageLayout, @NativeType("VkImageCopy const *") VkImageCopy.Buffer pRegions) { nvkCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, pRegions.remaining(), pRegions.address()); } // --- [ vkCmdBlitImage ] --- /** * Unsafe version of: {@link #vkCmdBlitImage CmdBlitImage} * * @param regionCount the number of regions to blit. */ public static void nvkCmdBlitImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, int regionCount, long pRegions, int filter) { long __functionAddress = commandBuffer.getCapabilities().vkCmdBlitImage; callPJJPV(commandBuffer.address(), srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter, __functionAddress); } /** * Copy regions of an image, potentially performing format conversion,. * *
C Specification
* *

To copy regions of a source image into a destination image, potentially performing format conversion, arbitrary scaling, and filtering, call:

* *

     * void vkCmdBlitImage(
     *     VkCommandBuffer                             commandBuffer,
     *     VkImage                                     srcImage,
     *     VkImageLayout                               srcImageLayout,
     *     VkImage                                     dstImage,
     *     VkImageLayout                               dstImageLayout,
     *     uint32_t                                    regionCount,
     *     const VkImageBlit*                          pRegions,
     *     VkFilter                                    filter);
* *
Description
* *

{@code vkCmdBlitImage} must not be used for multisampled source or destination images. Use {@link #vkCmdResolveImage CmdResolveImage} for this purpose.

* *

As the sizes of the source and destination extents can differ in any dimension, texels in the source extent are scaled and filtered to the destination extent. Scaling occurs via the following operations:

* *
    *
  • For each destination texel, the integer coordinate of that texel is converted to an unnormalized texture coordinate, using the effective inverse of the equations described in unnormalized to integer conversion: * *
    *
    ubase = i + ½
    *
    vbase = j + ½
    *
    wbase = k + ½
    *
    *
  • *
  • These base coordinates are then offset by the first destination offset: * *
    *
    uoffset = ubase - xdst0
    *
    voffset = vbase - ydst0
    *
    woffset = wbase - zdst0
    *
    aoffset = a - baseArrayCountdst
    *
    *
  • *
  • The scale is determined from the source and destination regions, and applied to the offset coordinates: * *
    *
    scaleu = (xsrc1 - xsrc0) / (xdst1 - xdst0)
    *
    scalev = (ysrc1 - ysrc0) / (ydst1 - ydst0)
    *
    scalew = (zsrc1 - zsrc0) / (zdst1 - zdst0)
    *
    uscaled = uoffset × scaleu
    *
    vscaled = voffset × scalev
    *
    wscaled = woffset × scalew
    *
    *
  • *
  • Finally the source offset is added to the scaled coordinates, to determine the final unnormalized coordinates used to sample from {@code srcImage}: * *
    *
    u = uscaled + xsrc0
    *
    v = vscaled + ysrc0
    *
    w = wscaled + zsrc0
    *
    q = mipLevel
    *
    a = aoffset + baseArrayCountsrc
    *
    *
  • *
* *

These coordinates are used to sample from the source image, as described in Image Operations chapter, with the filter mode equal to that of {@code filter}, a mipmap mode of {@link #VK_SAMPLER_MIPMAP_MODE_NEAREST SAMPLER_MIPMAP_MODE_NEAREST} and an address mode of {@link #VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE}. Implementations must clamp at the edge of the source image, and may additionally clamp to the edge of the source region.

* *
Note
* *

Due to allowable rounding errors in the generation of the source texture coordinates, it is not always possible to guarantee exactly which source texels will be sampled for a given blit. As rounding errors are implementation-dependent, the exact results of a blitting operation are also implementation-dependent.

*
* *

Blits are done layer by layer starting with the {@code baseArrayLayer} member of {@code srcSubresource} for the source and {@code dstSubresource} for the destination. {@code layerCount} layers are blitted to the destination image.

* *

When blitting 3D textures, slices in the destination region bounded by {@code dstOffsets}[0].z and {@code dstOffsets}[1].z are sampled from slices in the source region bounded by {@code srcOffsets}[0].z and {@code srcOffsets}[1].z. If the {@code filter} parameter is {@link #VK_FILTER_LINEAR FILTER_LINEAR} then the value sampled from the source image is taken by doing linear filtering using the interpolated z coordinate represented by w in the previous equations. If the {@code filter} parameter is {@link #VK_FILTER_NEAREST FILTER_NEAREST} then the value sampled from the source image is taken from the single nearest slice, with an implementation-dependent arithmetic rounding mode.

* *

The following filtering and conversion rules apply:

* *
    *
  • Integer formats can only be converted to other integer formats with the same signedness.
  • *
  • No format conversion is supported between depth/stencil images. The formats must match.
  • *
  • Format conversions on unorm, snorm, unscaled and packed float formats of the copied aspect of the image are performed by first converting the pixels to float values.
  • *
  • For sRGB source formats, nonlinear RGB values are converted to linear representation prior to filtering.
  • *
  • After filtering, the float values are first clamped and then cast to the destination image format. In case of sRGB destination format, linear RGB values are converted to nonlinear representation before writing the pixel to the image.
  • *
* *

Signed and unsigned integers are converted by first clamping to the representable range of the destination format, then casting the value.

* *
Valid Usage
* *
    *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code srcImage} must not be a protected image
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be an unprotected image
  • *
* *
    *
  • The source region specified by each element of {@code pRegions} must be a region that is contained within {@code srcImage}
  • *
  • The destination region specified by each element of {@code pRegions} must be a region that is contained within {@code dstImage}
  • *
  • The union of all destination regions, specified by the elements of {@code pRegions}, must not overlap in memory with any texel that may be sampled during the blit operation
  • *
  • The format features of {@code srcImage} must contain {@link #VK_FORMAT_FEATURE_BLIT_SRC_BIT FORMAT_FEATURE_BLIT_SRC_BIT}
  • *
  • {@code srcImage} must not use a format that requires a sampler Y’CBCR conversion
  • *
  • {@code srcImage} must have been created with {@link #VK_IMAGE_USAGE_TRANSFER_SRC_BIT IMAGE_USAGE_TRANSFER_SRC_BIT} usage flag
  • *
  • If {@code srcImage} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code srcImageLayout} must specify the layout of the image subresources of {@code srcImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code srcImageLayout} must be {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}, {@link #VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL} or {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}
  • *
  • The format features of {@code dstImage} must contain {@link #VK_FORMAT_FEATURE_BLIT_DST_BIT FORMAT_FEATURE_BLIT_DST_BIT}
  • *
  • {@code dstImage} must not use a format that requires a sampler Y’CBCR conversion
  • *
  • {@code dstImage} must have been created with {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstImage} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstImageLayout} must specify the layout of the image subresources of {@code dstImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code dstImageLayout} must be {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}, {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL} or {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}
  • *
  • If either of {@code srcImage} or {@code dstImage} was created with a signed integer {@code VkFormat}, the other must also have been created with a signed integer {@code VkFormat}
  • *
  • If either of {@code srcImage} or {@code dstImage} was created with an unsigned integer {@code VkFormat}, the other must also have been created with an unsigned integer {@code VkFormat}
  • *
  • If either of {@code srcImage} or {@code dstImage} was created with a depth/stencil format, the other must have exactly the same format
  • *
  • If {@code srcImage} was created with a depth/stencil format, {@code filter} must be {@link #VK_FILTER_NEAREST FILTER_NEAREST}
  • *
  • {@code srcImage} must have been created with a {@code samples} value of {@link #VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT}
  • *
  • {@code dstImage} must have been created with a {@code samples} value of {@link #VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT}
  • *
  • If {@code filter} is {@link #VK_FILTER_LINEAR FILTER_LINEAR}, then the format features of {@code srcImage} must contain {@link #VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT}
  • *
  • If {@code filter} is {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT}, then the format features of {@code srcImage} must contain {@link EXTFilterCubic#VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT}
  • *
  • If {@code filter} is {@link EXTFilterCubic#VK_FILTER_CUBIC_EXT FILTER_CUBIC_EXT}, {@code srcImage} must be of type {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}
  • *
  • The {@code srcSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The {@code dstSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • {@code dstImage} and {@code srcImage} must not have been created with {@code flags} containing {@link EXTFragmentDensityMap#VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT IMAGE_CREATE_SUBSAMPLED_BIT_EXT}
  • *
  • If either {@code srcImage} or {@code dstImage} is of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, then for each element of {@code pRegions}, {@code srcSubresource.baseArrayLayer} and {@code dstSubresource.baseArrayLayer} must each be 0, and {@code srcSubresource.layerCount} and {@code dstSubresource.layerCount} must each be 1
  • *
  • For each element of {@code pRegions}, {@code srcSubresource.aspectMask} must specify aspects present in {@code srcImage}
  • *
  • For each element of {@code pRegions}, {@code dstSubresource.aspectMask} must specify aspects present in {@code dstImage}
  • *
  • For each element of {@code pRegions}, {@code srcOffsets}[0].x and {@code srcOffsets}[1].x must both be greater than or equal to 0 and less than or equal to the width of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • For each element of {@code pRegions}, {@code srcOffsets}[0].y and {@code srcOffsets}[1].y must both be greater than or equal to 0 and less than or equal to the height of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code srcOffsets}[0].y must be 0 and {@code srcOffsets}[1].y must be 1
  • *
  • For each element of {@code pRegions}, {@code srcOffsets}[0].z and {@code srcOffsets}[1].z must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} or {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code srcOffsets}[0].z must be 0 and {@code srcOffsets}[1].z must be 1
  • *
  • For each element of {@code pRegions}, {@code dstOffsets}[0].x and {@code dstOffsets}[1].x must both be greater than or equal to 0 and less than or equal to the width of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • For each element of {@code pRegions}, {@code dstOffsets}[0].y and {@code dstOffsets}[1].y must both be greater than or equal to 0 and less than or equal to the height of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code dstOffsets}[0].y must be 0 and {@code dstOffsets}[1].y must be 1
  • *
  • For each element of {@code pRegions}, {@code dstOffsets}[0].z and {@code dstOffsets}[1].z must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} or {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code dstOffsets}[0].z must be 0 and {@code dstOffsets}[1].z must be 1
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code srcImage} must be a valid {@code VkImage} handle
  • *
  • {@code srcImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code dstImage} must be a valid {@code VkImage} handle
  • *
  • {@code dstImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pRegions} must be a valid pointer to an array of {@code regionCount} valid {@link VkImageBlit} structures
  • *
  • {@code filter} must be a valid {@code VkFilter} value
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code regionCount} must be greater than 0
  • *
  • Each of {@code commandBuffer}, {@code dstImage}, and {@code srcImage} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics
* *
See Also
* *

{@link VkImageBlit}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param srcImage the source image. * @param srcImageLayout the layout of the source image subresources for the blit. * @param dstImage the destination image. * @param dstImageLayout the layout of the destination image subresources for the blit. * @param pRegions a pointer to an array of {@link VkImageBlit} structures specifying the regions to blit. * @param filter a {@code VkFilter} specifying the filter to apply if the blits require scaling. */ public static void vkCmdBlitImage(VkCommandBuffer commandBuffer, @NativeType("VkImage") long srcImage, @NativeType("VkImageLayout") int srcImageLayout, @NativeType("VkImage") long dstImage, @NativeType("VkImageLayout") int dstImageLayout, @NativeType("VkImageBlit const *") VkImageBlit.Buffer pRegions, @NativeType("VkFilter") int filter) { nvkCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, pRegions.remaining(), pRegions.address(), filter); } // --- [ vkCmdCopyBufferToImage ] --- /** * Unsafe version of: {@link #vkCmdCopyBufferToImage CmdCopyBufferToImage} * * @param regionCount the number of regions to copy. */ public static void nvkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, long srcBuffer, long dstImage, int dstImageLayout, int regionCount, long pRegions) { long __functionAddress = commandBuffer.getCapabilities().vkCmdCopyBufferToImage; callPJJPV(commandBuffer.address(), srcBuffer, dstImage, dstImageLayout, regionCount, pRegions, __functionAddress); } /** * Copy data from a buffer into an image. * *
C Specification
* *

To copy data from a buffer object to an image object, call:

* *

     * void vkCmdCopyBufferToImage(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    srcBuffer,
     *     VkImage                                     dstImage,
     *     VkImageLayout                               dstImageLayout,
     *     uint32_t                                    regionCount,
     *     const VkBufferImageCopy*                    pRegions);
* *
Description
* *

Each region in {@code pRegions} is copied from the specified region of the source buffer to the specified region of the destination image.

* *

If {@code dstImage} has a multi-planar format, regions of each plane to be a target of a copy must be specified separately using the {@code pRegions} member of the {@link VkBufferImageCopy} structure. In this case, the {@code aspectMask} of {@code imageSubresource} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT}, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}, or {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT}. For the purposes of {@code vkCmdCopyBufferToImage}, each plane of a multi-planar image is treated as having the format listed in Compatible formats of planes of multi-planar formats for the plane identified by the {@code aspectMask} of the corresponding subresource. This applies both to {@code VkFormat} and to coordinates used in the copy, which correspond to texels in the plane rather than how these texels map to coordinates in the image as a whole.

* *
Valid Usage
* *
    *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code srcBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be an unprotected image
  • *
  • The image region specified by each element of {@code pRegions} must be contained within the specified {@code imageSubresource} of {@code dstImage}
  • *
* *
    *
  • {@code srcBuffer} must be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element of {@code pRegions}
  • *
  • The union of all source regions, and the union of all destination regions, specified by the elements of {@code pRegions}, must not overlap in memory
  • *
  • {@code srcBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_SRC_BIT BUFFER_USAGE_TRANSFER_SRC_BIT} usage flag
  • *
  • The format features of {@code dstImage} must contain {@link VK11#VK_FORMAT_FEATURE_TRANSFER_DST_BIT FORMAT_FEATURE_TRANSFER_DST_BIT}
  • *
  • If {@code srcBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstImage} must have been created with {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstImage} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstImage} must have a sample count equal to {@link #VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT}
  • *
  • {@code dstImageLayout} must specify the layout of the image subresources of {@code dstImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code dstImageLayout} must be {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL}, {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}, or {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}
  • *
  • The {@code imageSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • The imageSubresource.baseArrayLayer + imageSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • The {@code imageOffset} and {@code imageExtent} members of each element of {@code pRegions} must respect the image transfer granularity requirements of {@code commandBuffer}’s command pool’s queue family, as described in {@link VkQueueFamilyProperties}
  • *
  • {@code dstImage} must not have been created with {@code flags} containing {@link EXTFragmentDensityMap#VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT IMAGE_CREATE_SUBSAMPLED_BIT_EXT}
  • *
  • If the queue family used to create the {@code VkCommandPool} which {@code commandBuffer} was allocated from does not support {@link #VK_QUEUE_GRAPHICS_BIT QUEUE_GRAPHICS_BIT}, for each element of {@code pRegions}, the {@code aspectMask} member of {@code imageSubresource} must not be {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT} or {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}
  • *
  • For each element of {@code pRegions}, {@code imageOffset.x} and (imageExtent.width + imageOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified {@code imageSubresource} of {@code dstImage}
  • *
  • For each element of {@code pRegions}, {@code imageOffset.y} and (imageExtent.height + imageOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified {@code imageSubresource} of {@code dstImage}
  • *
* *
    *
  • If {@code dstImage} does not have either a depth/stencil or a multi-planar format, then for each element of {@code pRegions}, {@code bufferOffset} must be a multiple of the format’s texel block size
  • *
  • If {@code dstImage} has a multi-planar format, then for each element of {@code pRegions}, {@code bufferOffset} must be a multiple of the element size of the compatible format for the format and the {@code aspectMask} of the {@code imageSubresource} as defined in Compatible formats of planes of multi-planar formats
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code imageOffset.y} must be 0 and {@code imageExtent.height} must be 1
  • *
  • For each element of {@code pRegions}, {@code imageOffset.z} and (imageExtent.depth + imageOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code imageSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} or {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code imageOffset.z} must be 0 and {@code imageExtent.depth} must be 1
  • *
  • If {@code dstImage} is a blocked image, for each element of {@code pRegions}, {@code bufferRowLength} must be a multiple of the compressed texel block width
  • *
  • If {@code dstImage} is a blocked image, for each element of {@code pRegions}, {@code bufferImageHeight} must be a multiple of the compressed texel block height
  • *
  • If {@code dstImage} is a blocked image, for each element of {@code pRegions}, all members of {@code imageOffset} must be a multiple of the corresponding dimensions of the compressed texel block
  • *
  • If {@code dstImage} is a blocked image, for each element of {@code pRegions}, {@code bufferOffset} must be a multiple of the compressed texel block size in bytes
  • *
  • If {@code dstImage} is a blocked image, for each element of {@code pRegions}, {@code imageExtent.width} must be a multiple of the compressed texel block width or (imageExtent.width + imageOffset.x) must equal the width of the specified {@code imageSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is a blocked image, for each element of {@code pRegions}, {@code imageExtent.height} must be a multiple of the compressed texel block height or (imageExtent.height + imageOffset.y) must equal the height of the specified {@code imageSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is a blocked image, for each element of {@code pRegions}, {@code imageExtent.depth} must be a multiple of the compressed texel block depth or (imageExtent.depth + imageOffset.z) must equal the depth of the specified {@code imageSubresource} of {@code dstImage}
  • *
  • For each element of {@code pRegions}, {@code imageSubresource.aspectMask} must specify aspects present in {@code dstImage}
  • *
  • If {@code dstImage} has a multi-planar format, then for each element of {@code pRegions}, {@code imageSubresource.aspectMask} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT}, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}, or {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} (with {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} valid only for image formats with three planes)
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, for each element of {@code pRegions}, {@code imageSubresource.baseArrayLayer} must be 0 and {@code imageSubresource.layerCount} must be 1
  • *
  • If {@code dstImage} is not a blocked image, for each element of {@code pRegions}, {@code bufferRowLength} multiplied by the texel block size of {@code dstImage} must be less than or equal to 231-1
  • *
  • If {@code dstImage} is a blocked image, for each element of {@code pRegions}, {@code bufferRowLength} divided by the compressed texel block width and then multiplied by the texel block size of {@code dstImage} must be less than or equal to 231-1
  • *
  • If the queue family used to create the {@code VkCommandPool} which {@code commandBuffer} was allocated from does not support {@link #VK_QUEUE_GRAPHICS_BIT QUEUE_GRAPHICS_BIT} or {@link #VK_QUEUE_COMPUTE_BIT QUEUE_COMPUTE_BIT}, the {@code bufferOffset} member of any element of {@code pRegions} must be a multiple of 4
  • *
  • If {@code dstImage} has a depth/stencil format, the {@code bufferOffset} member of any element of {@code pRegions} must be a multiple of 4
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code srcBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code dstImage} must be a valid {@code VkImage} handle
  • *
  • {@code dstImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pRegions} must be a valid pointer to an array of {@code regionCount} valid {@link VkBufferImageCopy} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code regionCount} must be greater than 0
  • *
  • Each of {@code commandBuffer}, {@code dstImage}, and {@code srcBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* *
See Also
* *

{@link VkBufferImageCopy}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param srcBuffer the source buffer. * @param dstImage the destination image. * @param dstImageLayout the layout of the destination image subresources for the copy. * @param pRegions a pointer to an array of {@link VkBufferImageCopy} structures specifying the regions to copy. */ public static void vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long srcBuffer, @NativeType("VkImage") long dstImage, @NativeType("VkImageLayout") int dstImageLayout, @NativeType("VkBufferImageCopy const *") VkBufferImageCopy.Buffer pRegions) { nvkCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, pRegions.remaining(), pRegions.address()); } // --- [ vkCmdCopyImageToBuffer ] --- /** * Unsafe version of: {@link #vkCmdCopyImageToBuffer CmdCopyImageToBuffer} * * @param regionCount the number of regions to copy. */ public static void nvkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstBuffer, int regionCount, long pRegions) { long __functionAddress = commandBuffer.getCapabilities().vkCmdCopyImageToBuffer; callPJJPV(commandBuffer.address(), srcImage, srcImageLayout, dstBuffer, regionCount, pRegions, __functionAddress); } /** * Copy image data into a buffer. * *
C Specification
* *

To copy data from an image object to a buffer object, call:

* *

     * void vkCmdCopyImageToBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkImage                                     srcImage,
     *     VkImageLayout                               srcImageLayout,
     *     VkBuffer                                    dstBuffer,
     *     uint32_t                                    regionCount,
     *     const VkBufferImageCopy*                    pRegions);
* *
Description
* *

Each region in {@code pRegions} is copied from the specified region of the source image to the specified region of the destination buffer.

* *

If {@code srcImage} has a multi-planar format, regions of each plane to be a source of a copy must be specified separately using the {@code pRegions} member of the {@link VkBufferImageCopy} structure. In this case, the {@code aspectMask} of {@code imageSubresource} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT}, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}, or {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT}. For the purposes of {@code vkCmdCopyBufferToImage}, each plane of a multi-planar image is treated as having the format listed in Compatible formats of planes of multi-planar formats for the plane identified by the {@code aspectMask} of the corresponding subresource. This applies both to {@code VkFormat} and to coordinates used in the copy, which correspond to texels in the plane rather than how these texels map to coordinates in the image as a whole.

* *
Valid Usage
* *
    *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code srcImage} must not be a protected image
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be an unprotected buffer
  • *
* *
    *
  • The image region specified by each element of {@code pRegions} must be contained within the specified {@code imageSubresource} of {@code srcImage}
  • *
* *
    *
  • {@code dstBuffer} must be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element of {@code pRegions}
  • *
  • The union of all source regions, and the union of all destination regions, specified by the elements of {@code pRegions}, must not overlap in memory
  • *
  • {@code srcImage} must have been created with {@link #VK_IMAGE_USAGE_TRANSFER_SRC_BIT IMAGE_USAGE_TRANSFER_SRC_BIT} usage flag
  • *
  • The format features of {@code srcImage} must contain {@link VK11#VK_FORMAT_FEATURE_TRANSFER_SRC_BIT FORMAT_FEATURE_TRANSFER_SRC_BIT}
  • *
  • If {@code srcImage} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code srcImage} must have a sample count equal to {@link #VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT}
  • *
  • {@code srcImageLayout} must specify the layout of the image subresources of {@code srcImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code srcImageLayout} must be {@link #VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL}, {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}, or {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}
  • *
  • The {@code imageSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The imageSubresource.baseArrayLayer + imageSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The {@code imageOffset} and {@code imageExtent} members of each element of {@code pRegions} must respect the image transfer granularity requirements of {@code commandBuffer}’s command pool’s queue family, as described in {@link VkQueueFamilyProperties}
  • *
  • {@code srcImage} must not have been created with {@code flags} containing {@link EXTFragmentDensityMap#VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT IMAGE_CREATE_SUBSAMPLED_BIT_EXT}
  • *
  • For each element of {@code pRegions}, {@code imageOffset.x} and (imageExtent.width + imageOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified {@code imageSubresource} of {@code srcImage}
  • *
  • For each element of {@code pRegions}, {@code imageOffset.y} and (imageExtent.height + imageOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified {@code imageSubresource} of {@code srcImage}
  • *
* *
    *
  • If {@code srcImage} does not have either a depth/stencil or a multi-planar format, then for each element of {@code pRegions}, {@code bufferOffset} must be a multiple of the format’s texel block size
  • *
  • If {@code srcImage} has a multi-planar format, then for each element of {@code pRegions}, {@code bufferOffset} must be a multiple of the element size of the compatible format for the format and the {@code aspectMask} of the {@code imageSubresource} as defined in Compatible formats of planes of multi-planar formats
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code imageOffset.y} must be 0 and {@code imageExtent.height} must be 1
  • *
  • For each element of {@code pRegions}, {@code imageOffset.z} and (imageExtent.depth + imageOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code imageSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} or {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code imageOffset.z} must be 0 and {@code imageExtent.depth} must be 1
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code bufferRowLength} must be a multiple of the compressed texel block width
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code bufferImageHeight} must be a multiple of the compressed texel block height
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, all members of {@code imageOffset} must be a multiple of the corresponding dimensions of the compressed texel block
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code bufferOffset} must be a multiple of the compressed texel block size in bytes
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code imageExtent.width} must be a multiple of the compressed texel block width or (imageExtent.width + imageOffset.x) must equal the width of the specified {@code imageSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code imageExtent.height} must be a multiple of the compressed texel block height or (imageExtent.height + imageOffset.y) must equal the height of the specified {@code imageSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code imageExtent.depth} must be a multiple of the compressed texel block depth or (imageExtent.depth + imageOffset.z) must equal the depth of the specified {@code imageSubresource} of {@code srcImage}
  • *
  • For each element of {@code pRegions}, {@code imageSubresource.aspectMask} must specify aspects present in {@code srcImage}
  • *
  • If {@code srcImage} has a multi-planar format, then for each element of {@code pRegions}, {@code imageSubresource.aspectMask} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT}, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}, or {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} (with {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} valid only for image formats with three planes)
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, for each element of {@code pRegions}, {@code imageSubresource.baseArrayLayer} must be 0 and {@code imageSubresource.layerCount} must be 1
  • *
  • If {@code srcImage} is not a blocked image, for each element of {@code pRegions}, {@code bufferRowLength} multiplied by the texel block size of {@code srcImage} must be less than or equal to 231-1
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code bufferRowLength} divided by the compressed texel block width and then multiplied by the texel block size of {@code srcImage} must be less than or equal to 231-1
  • *
  • If the queue family used to create the {@code VkCommandPool} which {@code commandBuffer} was allocated from does not support {@link #VK_QUEUE_GRAPHICS_BIT QUEUE_GRAPHICS_BIT} or {@link #VK_QUEUE_COMPUTE_BIT QUEUE_COMPUTE_BIT}, the {@code bufferOffset} member of any element of {@code pRegions} must be a multiple of 4
  • *
  • If {@code srcImage} has a depth/stencil format, the {@code bufferOffset} member of any element of {@code pRegions} must be a multiple of 4
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code srcImage} must be a valid {@code VkImage} handle
  • *
  • {@code srcImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code pRegions} must be a valid pointer to an array of {@code regionCount} valid {@link VkBufferImageCopy} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code regionCount} must be greater than 0
  • *
  • Each of {@code commandBuffer}, {@code dstBuffer}, and {@code srcImage} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* *
See Also
* *

{@link VkBufferImageCopy}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param srcImage the source image. * @param srcImageLayout the layout of the source image subresources for the copy. * @param dstBuffer the destination buffer. * @param pRegions a pointer to an array of {@link VkBufferImageCopy} structures specifying the regions to copy. */ public static void vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, @NativeType("VkImage") long srcImage, @NativeType("VkImageLayout") int srcImageLayout, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkBufferImageCopy const *") VkBufferImageCopy.Buffer pRegions) { nvkCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, pRegions.remaining(), pRegions.address()); } // --- [ vkCmdUpdateBuffer ] --- /** * Unsafe version of: {@link #vkCmdUpdateBuffer CmdUpdateBuffer} * * @param dataSize the number of bytes to update, and must be a multiple of 4. */ public static void nvkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, long dataSize, long pData) { long __functionAddress = commandBuffer.getCapabilities().vkCmdUpdateBuffer; callPJJJPV(commandBuffer.address(), dstBuffer, dstOffset, dataSize, pData, __functionAddress); } /** * Update a buffer’s contents from host memory. * *
C Specification
* *

To update buffer data inline in a command buffer, call:

* *

     * void vkCmdUpdateBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    dstBuffer,
     *     VkDeviceSize                                dstOffset,
     *     VkDeviceSize                                dataSize,
     *     const void*                                 pData);
* *
Description
* *

{@code dataSize} must be less than or equal to 65536 bytes. For larger updates, applications can use buffer to buffer copies.

* *
Note
* *

Buffer updates performed with {@code vkCmdUpdateBuffer} first copy the data into command buffer memory when the command is recorded (which requires additional storage and may incur an additional allocation), and then copy the data from the command buffer into {@code dstBuffer} when the command is executed on a device.

* *

The additional cost of this functionality compared to buffer to buffer copies means it is only recommended for very small amounts of data, and is why it is limited to only 65536 bytes.

* *

Applications can work around this by issuing multiple {@code vkCmdUpdateBuffer} commands to different ranges of the same buffer, but it is strongly recommended that they should not.

*
* *

The source data is copied from the user pointer to the command buffer when the command is called.

* *

{@code vkCmdUpdateBuffer} is only allowed outside of a render pass. This command is treated as “{@code transfer}” operation, for the purposes of synchronization barriers. The {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} must be specified in {@code usage} of {@link VkBufferCreateInfo} in order for the buffer to be compatible with {@code vkCmdUpdateBuffer}.

* *
Valid Usage
* *
    *
  • {@code dstOffset} must be less than the size of {@code dstBuffer}
  • *
  • {@code dataSize} must be less than or equal to the size of {@code dstBuffer} minus {@code dstOffset}
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstOffset} must be a multiple of 4
  • *
  • {@code dataSize} must be less than or equal to 65536
  • *
  • {@code dataSize} must be a multiple of 4
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be an unprotected buffer
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code pData} must be a valid pointer to an array of {@code dataSize} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code dataSize} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code dstBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param dstBuffer a handle to the buffer to be updated. * @param dstOffset the byte offset into the buffer to start updating, and must be a multiple of 4. * @param pData a pointer to the source data for the buffer update, and must be at least {@code dataSize} bytes in size. */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") ByteBuffer pData) { nvkCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, pData.remaining(), memAddress(pData)); } /** * Update a buffer’s contents from host memory. * *
C Specification
* *

To update buffer data inline in a command buffer, call:

* *

     * void vkCmdUpdateBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    dstBuffer,
     *     VkDeviceSize                                dstOffset,
     *     VkDeviceSize                                dataSize,
     *     const void*                                 pData);
* *
Description
* *

{@code dataSize} must be less than or equal to 65536 bytes. For larger updates, applications can use buffer to buffer copies.

* *
Note
* *

Buffer updates performed with {@code vkCmdUpdateBuffer} first copy the data into command buffer memory when the command is recorded (which requires additional storage and may incur an additional allocation), and then copy the data from the command buffer into {@code dstBuffer} when the command is executed on a device.

* *

The additional cost of this functionality compared to buffer to buffer copies means it is only recommended for very small amounts of data, and is why it is limited to only 65536 bytes.

* *

Applications can work around this by issuing multiple {@code vkCmdUpdateBuffer} commands to different ranges of the same buffer, but it is strongly recommended that they should not.

*
* *

The source data is copied from the user pointer to the command buffer when the command is called.

* *

{@code vkCmdUpdateBuffer} is only allowed outside of a render pass. This command is treated as “{@code transfer}” operation, for the purposes of synchronization barriers. The {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} must be specified in {@code usage} of {@link VkBufferCreateInfo} in order for the buffer to be compatible with {@code vkCmdUpdateBuffer}.

* *
Valid Usage
* *
    *
  • {@code dstOffset} must be less than the size of {@code dstBuffer}
  • *
  • {@code dataSize} must be less than or equal to the size of {@code dstBuffer} minus {@code dstOffset}
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstOffset} must be a multiple of 4
  • *
  • {@code dataSize} must be less than or equal to 65536
  • *
  • {@code dataSize} must be a multiple of 4
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be an unprotected buffer
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code pData} must be a valid pointer to an array of {@code dataSize} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code dataSize} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code dstBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param dstBuffer a handle to the buffer to be updated. * @param dstOffset the byte offset into the buffer to start updating, and must be a multiple of 4. * @param pData a pointer to the source data for the buffer update, and must be at least {@code dataSize} bytes in size. */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") ShortBuffer pData) { nvkCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, Integer.toUnsignedLong(pData.remaining()) << 1, memAddress(pData)); } /** * Update a buffer’s contents from host memory. * *
C Specification
* *

To update buffer data inline in a command buffer, call:

* *

     * void vkCmdUpdateBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    dstBuffer,
     *     VkDeviceSize                                dstOffset,
     *     VkDeviceSize                                dataSize,
     *     const void*                                 pData);
* *
Description
* *

{@code dataSize} must be less than or equal to 65536 bytes. For larger updates, applications can use buffer to buffer copies.

* *
Note
* *

Buffer updates performed with {@code vkCmdUpdateBuffer} first copy the data into command buffer memory when the command is recorded (which requires additional storage and may incur an additional allocation), and then copy the data from the command buffer into {@code dstBuffer} when the command is executed on a device.

* *

The additional cost of this functionality compared to buffer to buffer copies means it is only recommended for very small amounts of data, and is why it is limited to only 65536 bytes.

* *

Applications can work around this by issuing multiple {@code vkCmdUpdateBuffer} commands to different ranges of the same buffer, but it is strongly recommended that they should not.

*
* *

The source data is copied from the user pointer to the command buffer when the command is called.

* *

{@code vkCmdUpdateBuffer} is only allowed outside of a render pass. This command is treated as “{@code transfer}” operation, for the purposes of synchronization barriers. The {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} must be specified in {@code usage} of {@link VkBufferCreateInfo} in order for the buffer to be compatible with {@code vkCmdUpdateBuffer}.

* *
Valid Usage
* *
    *
  • {@code dstOffset} must be less than the size of {@code dstBuffer}
  • *
  • {@code dataSize} must be less than or equal to the size of {@code dstBuffer} minus {@code dstOffset}
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstOffset} must be a multiple of 4
  • *
  • {@code dataSize} must be less than or equal to 65536
  • *
  • {@code dataSize} must be a multiple of 4
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be an unprotected buffer
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code pData} must be a valid pointer to an array of {@code dataSize} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code dataSize} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code dstBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param dstBuffer a handle to the buffer to be updated. * @param dstOffset the byte offset into the buffer to start updating, and must be a multiple of 4. * @param pData a pointer to the source data for the buffer update, and must be at least {@code dataSize} bytes in size. */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") IntBuffer pData) { nvkCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, Integer.toUnsignedLong(pData.remaining()) << 2, memAddress(pData)); } /** * Update a buffer’s contents from host memory. * *
C Specification
* *

To update buffer data inline in a command buffer, call:

* *

     * void vkCmdUpdateBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    dstBuffer,
     *     VkDeviceSize                                dstOffset,
     *     VkDeviceSize                                dataSize,
     *     const void*                                 pData);
* *
Description
* *

{@code dataSize} must be less than or equal to 65536 bytes. For larger updates, applications can use buffer to buffer copies.

* *
Note
* *

Buffer updates performed with {@code vkCmdUpdateBuffer} first copy the data into command buffer memory when the command is recorded (which requires additional storage and may incur an additional allocation), and then copy the data from the command buffer into {@code dstBuffer} when the command is executed on a device.

* *

The additional cost of this functionality compared to buffer to buffer copies means it is only recommended for very small amounts of data, and is why it is limited to only 65536 bytes.

* *

Applications can work around this by issuing multiple {@code vkCmdUpdateBuffer} commands to different ranges of the same buffer, but it is strongly recommended that they should not.

*
* *

The source data is copied from the user pointer to the command buffer when the command is called.

* *

{@code vkCmdUpdateBuffer} is only allowed outside of a render pass. This command is treated as “{@code transfer}” operation, for the purposes of synchronization barriers. The {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} must be specified in {@code usage} of {@link VkBufferCreateInfo} in order for the buffer to be compatible with {@code vkCmdUpdateBuffer}.

* *
Valid Usage
* *
    *
  • {@code dstOffset} must be less than the size of {@code dstBuffer}
  • *
  • {@code dataSize} must be less than or equal to the size of {@code dstBuffer} minus {@code dstOffset}
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstOffset} must be a multiple of 4
  • *
  • {@code dataSize} must be less than or equal to 65536
  • *
  • {@code dataSize} must be a multiple of 4
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be an unprotected buffer
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code pData} must be a valid pointer to an array of {@code dataSize} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code dataSize} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code dstBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param dstBuffer a handle to the buffer to be updated. * @param dstOffset the byte offset into the buffer to start updating, and must be a multiple of 4. * @param pData a pointer to the source data for the buffer update, and must be at least {@code dataSize} bytes in size. */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") LongBuffer pData) { nvkCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, Integer.toUnsignedLong(pData.remaining()) << 3, memAddress(pData)); } /** * Update a buffer’s contents from host memory. * *
C Specification
* *

To update buffer data inline in a command buffer, call:

* *

     * void vkCmdUpdateBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    dstBuffer,
     *     VkDeviceSize                                dstOffset,
     *     VkDeviceSize                                dataSize,
     *     const void*                                 pData);
* *
Description
* *

{@code dataSize} must be less than or equal to 65536 bytes. For larger updates, applications can use buffer to buffer copies.

* *
Note
* *

Buffer updates performed with {@code vkCmdUpdateBuffer} first copy the data into command buffer memory when the command is recorded (which requires additional storage and may incur an additional allocation), and then copy the data from the command buffer into {@code dstBuffer} when the command is executed on a device.

* *

The additional cost of this functionality compared to buffer to buffer copies means it is only recommended for very small amounts of data, and is why it is limited to only 65536 bytes.

* *

Applications can work around this by issuing multiple {@code vkCmdUpdateBuffer} commands to different ranges of the same buffer, but it is strongly recommended that they should not.

*
* *

The source data is copied from the user pointer to the command buffer when the command is called.

* *

{@code vkCmdUpdateBuffer} is only allowed outside of a render pass. This command is treated as “{@code transfer}” operation, for the purposes of synchronization barriers. The {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} must be specified in {@code usage} of {@link VkBufferCreateInfo} in order for the buffer to be compatible with {@code vkCmdUpdateBuffer}.

* *
Valid Usage
* *
    *
  • {@code dstOffset} must be less than the size of {@code dstBuffer}
  • *
  • {@code dataSize} must be less than or equal to the size of {@code dstBuffer} minus {@code dstOffset}
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstOffset} must be a multiple of 4
  • *
  • {@code dataSize} must be less than or equal to 65536
  • *
  • {@code dataSize} must be a multiple of 4
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be an unprotected buffer
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code pData} must be a valid pointer to an array of {@code dataSize} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code dataSize} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code dstBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param dstBuffer a handle to the buffer to be updated. * @param dstOffset the byte offset into the buffer to start updating, and must be a multiple of 4. * @param pData a pointer to the source data for the buffer update, and must be at least {@code dataSize} bytes in size. */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") FloatBuffer pData) { nvkCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, Integer.toUnsignedLong(pData.remaining()) << 2, memAddress(pData)); } /** * Update a buffer’s contents from host memory. * *
C Specification
* *

To update buffer data inline in a command buffer, call:

* *

     * void vkCmdUpdateBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    dstBuffer,
     *     VkDeviceSize                                dstOffset,
     *     VkDeviceSize                                dataSize,
     *     const void*                                 pData);
* *
Description
* *

{@code dataSize} must be less than or equal to 65536 bytes. For larger updates, applications can use buffer to buffer copies.

* *
Note
* *

Buffer updates performed with {@code vkCmdUpdateBuffer} first copy the data into command buffer memory when the command is recorded (which requires additional storage and may incur an additional allocation), and then copy the data from the command buffer into {@code dstBuffer} when the command is executed on a device.

* *

The additional cost of this functionality compared to buffer to buffer copies means it is only recommended for very small amounts of data, and is why it is limited to only 65536 bytes.

* *

Applications can work around this by issuing multiple {@code vkCmdUpdateBuffer} commands to different ranges of the same buffer, but it is strongly recommended that they should not.

*
* *

The source data is copied from the user pointer to the command buffer when the command is called.

* *

{@code vkCmdUpdateBuffer} is only allowed outside of a render pass. This command is treated as “{@code transfer}” operation, for the purposes of synchronization barriers. The {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} must be specified in {@code usage} of {@link VkBufferCreateInfo} in order for the buffer to be compatible with {@code vkCmdUpdateBuffer}.

* *
Valid Usage
* *
    *
  • {@code dstOffset} must be less than the size of {@code dstBuffer}
  • *
  • {@code dataSize} must be less than or equal to the size of {@code dstBuffer} minus {@code dstOffset}
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstOffset} must be a multiple of 4
  • *
  • {@code dataSize} must be less than or equal to 65536
  • *
  • {@code dataSize} must be a multiple of 4
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be an unprotected buffer
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code pData} must be a valid pointer to an array of {@code dataSize} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code dataSize} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code dstBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param dstBuffer a handle to the buffer to be updated. * @param dstOffset the byte offset into the buffer to start updating, and must be a multiple of 4. * @param pData a pointer to the source data for the buffer update, and must be at least {@code dataSize} bytes in size. */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") DoubleBuffer pData) { nvkCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, Integer.toUnsignedLong(pData.remaining()) << 3, memAddress(pData)); } // --- [ vkCmdFillBuffer ] --- /** * Fill a region of a buffer with a fixed value. * *
C Specification
* *

To clear buffer data, call:

* *

     * void vkCmdFillBuffer(
     *     VkCommandBuffer                             commandBuffer,
     *     VkBuffer                                    dstBuffer,
     *     VkDeviceSize                                dstOffset,
     *     VkDeviceSize                                size,
     *     uint32_t                                    data);
* *
Description
* *

{@code vkCmdFillBuffer} is treated as “{@code transfer}” operation for the purposes of synchronization barriers. The {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} must be specified in {@code usage} of {@link VkBufferCreateInfo} in order for the buffer to be compatible with {@code vkCmdFillBuffer}.

* *
Valid Usage
* *
    *
  • {@code dstOffset} must be less than the size of {@code dstBuffer}
  • *
  • {@code dstOffset} must be a multiple of 4
  • *
  • If {@code size} is not equal to {@link #VK_WHOLE_SIZE WHOLE_SIZE}, {@code size} must be greater than 0
  • *
  • If {@code size} is not equal to {@link #VK_WHOLE_SIZE WHOLE_SIZE}, {@code size} must be less than or equal to the size of {@code dstBuffer} minus {@code dstOffset}
  • *
  • If {@code size} is not equal to {@link #VK_WHOLE_SIZE WHOLE_SIZE}, {@code size} must be a multiple of 4
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be a protected buffer
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstBuffer} must not be an unprotected buffer
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • Both of {@code commandBuffer}, and {@code dstBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideTransfer Graphics Compute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param dstBuffer the buffer to be filled. * @param dstOffset the byte offset into the buffer at which to start filling, and must be a multiple of 4. * @param size the number of bytes to fill, and must be either a multiple of 4, or {@link #VK_WHOLE_SIZE WHOLE_SIZE} to fill the range from {@code offset} to the end of the buffer. If {@link #VK_WHOLE_SIZE WHOLE_SIZE} is used and the remaining size of the buffer is not a multiple of 4, then the nearest smaller multiple is used. * @param data the 4-byte word written repeatedly to the buffer to fill {@code size} bytes of data. The data word is written to memory according to the host endianness. */ public static void vkCmdFillBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("VkDeviceSize") long size, @NativeType("uint32_t") int data) { long __functionAddress = commandBuffer.getCapabilities().vkCmdFillBuffer; callPJJJV(commandBuffer.address(), dstBuffer, dstOffset, size, data, __functionAddress); } // --- [ vkCmdClearColorImage ] --- /** * Unsafe version of: {@link #vkCmdClearColorImage CmdClearColorImage} * * @param rangeCount the number of image subresource range structures in {@code pRanges}. */ public static void nvkCmdClearColorImage(VkCommandBuffer commandBuffer, long image, int imageLayout, long pColor, int rangeCount, long pRanges) { long __functionAddress = commandBuffer.getCapabilities().vkCmdClearColorImage; callPJPPV(commandBuffer.address(), image, imageLayout, pColor, rangeCount, pRanges, __functionAddress); } /** * Clear regions of a color image. * *
C Specification
* *

To clear one or more subranges of a color image, call:

* *

     * void vkCmdClearColorImage(
     *     VkCommandBuffer                             commandBuffer,
     *     VkImage                                     image,
     *     VkImageLayout                               imageLayout,
     *     const VkClearColorValue*                    pColor,
     *     uint32_t                                    rangeCount,
     *     const VkImageSubresourceRange*              pRanges);
* *
Description
* *

Each specified range in {@code pRanges} is cleared to the value specified by {@code pColor}.

* *
Valid Usage
* *
    *
  • The format features of {@code image} must contain {@link VK11#VK_FORMAT_FEATURE_TRANSFER_DST_BIT FORMAT_FEATURE_TRANSFER_DST_BIT}
  • *
  • {@code image} must have been created with {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • {@code image} must not use any of the formats that require a sampler Y’CBCR conversion
  • *
  • If {@code image} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code imageLayout} must specify the layout of the image subresource ranges of {@code image} specified in {@code pRanges} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code imageLayout} must be {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL}, {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}, or {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}
  • *
  • The {@link VkImageSubresourceRange}{@code ::aspectMask} members of the elements of the {@code pRanges} array must each only include {@link #VK_IMAGE_ASPECT_COLOR_BIT IMAGE_ASPECT_COLOR_BIT}
  • *
  • The {@link VkImageSubresourceRange}{@code ::baseMipLevel} members of the elements of the {@code pRanges} array must each be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • For each {@link VkImageSubresourceRange} element of {@code pRanges}, if the {@code levelCount} member is not {@link #VK_REMAINING_MIP_LEVELS REMAINING_MIP_LEVELS}, then baseMipLevel + levelCount must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • The {@link VkImageSubresourceRange}{@code ::baseArrayLayer} members of the elements of the {@code pRanges} array must each be less than the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • For each {@link VkImageSubresourceRange} element of {@code pRanges}, if the {@code layerCount} member is not {@link #VK_REMAINING_ARRAY_LAYERS REMAINING_ARRAY_LAYERS}, then baseArrayLayer + layerCount must be less than the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • {@code image} must not have a compressed or depth/stencil format
  • *
  • {@code pColor} must be a valid pointer to a {@link VkClearColorValue} union
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code image} must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, must not be an unprotected image
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code image} must be a valid {@code VkImage} handle
  • *
  • {@code imageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pRanges} must be a valid pointer to an array of {@code rangeCount} valid {@link VkImageSubresourceRange} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code rangeCount} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code image} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics Compute
* *
See Also
* *

{@link VkClearColorValue}, {@link VkImageSubresourceRange}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param image the image to be cleared. * @param imageLayout specifies the current layout of the image subresource ranges to be cleared, and must be {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}, {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL} or {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL}. * @param pColor a pointer to a {@link VkClearColorValue} structure containing the values that the image subresource ranges will be cleared to (see Clear Values below). * @param pRanges a pointer to an array of {@link VkImageSubresourceRange} structures describing a range of mipmap levels, array layers, and aspects to be cleared, as described in Image Views. */ public static void vkCmdClearColorImage(VkCommandBuffer commandBuffer, @NativeType("VkImage") long image, @NativeType("VkImageLayout") int imageLayout, @NativeType("VkClearColorValue const *") VkClearColorValue pColor, @NativeType("VkImageSubresourceRange const *") VkImageSubresourceRange.Buffer pRanges) { nvkCmdClearColorImage(commandBuffer, image, imageLayout, pColor.address(), pRanges.remaining(), pRanges.address()); } /** * Clear regions of a color image. * *
C Specification
* *

To clear one or more subranges of a color image, call:

* *

     * void vkCmdClearColorImage(
     *     VkCommandBuffer                             commandBuffer,
     *     VkImage                                     image,
     *     VkImageLayout                               imageLayout,
     *     const VkClearColorValue*                    pColor,
     *     uint32_t                                    rangeCount,
     *     const VkImageSubresourceRange*              pRanges);
* *
Description
* *

Each specified range in {@code pRanges} is cleared to the value specified by {@code pColor}.

* *
Valid Usage
* *
    *
  • The format features of {@code image} must contain {@link VK11#VK_FORMAT_FEATURE_TRANSFER_DST_BIT FORMAT_FEATURE_TRANSFER_DST_BIT}
  • *
  • {@code image} must have been created with {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • {@code image} must not use any of the formats that require a sampler Y’CBCR conversion
  • *
  • If {@code image} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code imageLayout} must specify the layout of the image subresource ranges of {@code image} specified in {@code pRanges} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code imageLayout} must be {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL}, {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}, or {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}
  • *
  • The {@link VkImageSubresourceRange}{@code ::aspectMask} members of the elements of the {@code pRanges} array must each only include {@link #VK_IMAGE_ASPECT_COLOR_BIT IMAGE_ASPECT_COLOR_BIT}
  • *
  • The {@link VkImageSubresourceRange}{@code ::baseMipLevel} members of the elements of the {@code pRanges} array must each be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • For each {@link VkImageSubresourceRange} element of {@code pRanges}, if the {@code levelCount} member is not {@link #VK_REMAINING_MIP_LEVELS REMAINING_MIP_LEVELS}, then baseMipLevel + levelCount must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • The {@link VkImageSubresourceRange}{@code ::baseArrayLayer} members of the elements of the {@code pRanges} array must each be less than the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • For each {@link VkImageSubresourceRange} element of {@code pRanges}, if the {@code layerCount} member is not {@link #VK_REMAINING_ARRAY_LAYERS REMAINING_ARRAY_LAYERS}, then baseArrayLayer + layerCount must be less than the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • {@code image} must not have a compressed or depth/stencil format
  • *
  • {@code pColor} must be a valid pointer to a {@link VkClearColorValue} union
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code image} must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, must not be an unprotected image
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code image} must be a valid {@code VkImage} handle
  • *
  • {@code imageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pRanges} must be a valid pointer to an array of {@code rangeCount} valid {@link VkImageSubresourceRange} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code rangeCount} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code image} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics Compute
* *
See Also
* *

{@link VkClearColorValue}, {@link VkImageSubresourceRange}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param image the image to be cleared. * @param imageLayout specifies the current layout of the image subresource ranges to be cleared, and must be {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}, {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL} or {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL}. * @param pColor a pointer to a {@link VkClearColorValue} structure containing the values that the image subresource ranges will be cleared to (see Clear Values below). */ public static void vkCmdClearColorImage(VkCommandBuffer commandBuffer, @NativeType("VkImage") long image, @NativeType("VkImageLayout") int imageLayout, @NativeType("VkClearColorValue const *") VkClearColorValue pColor, @NativeType("VkImageSubresourceRange const *") VkImageSubresourceRange pRange) { nvkCmdClearColorImage(commandBuffer, image, imageLayout, pColor.address(), 1, pRange.address()); } // --- [ vkCmdClearDepthStencilImage ] --- /** * Unsafe version of: {@link #vkCmdClearDepthStencilImage CmdClearDepthStencilImage} * * @param rangeCount the number of image subresource range structures in {@code pRanges}. */ public static void nvkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, long image, int imageLayout, long pDepthStencil, int rangeCount, long pRanges) { long __functionAddress = commandBuffer.getCapabilities().vkCmdClearDepthStencilImage; callPJPPV(commandBuffer.address(), image, imageLayout, pDepthStencil, rangeCount, pRanges, __functionAddress); } /** * Fill regions of a combined depth/stencil image. * *
C Specification
* *

To clear one or more subranges of a depth/stencil image, call:

* *

     * void vkCmdClearDepthStencilImage(
     *     VkCommandBuffer                             commandBuffer,
     *     VkImage                                     image,
     *     VkImageLayout                               imageLayout,
     *     const VkClearDepthStencilValue*             pDepthStencil,
     *     uint32_t                                    rangeCount,
     *     const VkImageSubresourceRange*              pRanges);
* *
Valid Usage
* *
    *
  • The format features of {@code image} must contain {@link VK11#VK_FORMAT_FEATURE_TRANSFER_DST_BIT FORMAT_FEATURE_TRANSFER_DST_BIT}
  • *
  • If the {@code aspect} member of any element of {@code pRanges} includes {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}, and {@code image} was created with {@link VkImageStencilUsageCreateInfo separate stencil usage}, {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} must have been included in the {@link VkImageStencilUsageCreateInfo}{@code ::stencilUsage} used to create {@code image}
  • *
  • If the {@code aspect} member of any element of {@code pRanges} includes {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}, and {@code image} was not created with {@link VkImageStencilUsageCreateInfo separate stencil usage}, {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} must have been included in the {@link VkImageCreateInfo}{@code ::usage} used to create {@code image}
  • *
  • If the {@code aspect} member of any element of {@code pRanges} includes {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT}, {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} must have been included in the {@link VkImageCreateInfo}{@code ::usage} used to create {@code image}
  • *
  • If {@code image} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code imageLayout} must specify the layout of the image subresource ranges of {@code image} specified in {@code pRanges} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code imageLayout} must be either of {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL} or {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}
  • *
  • The {@link VkImageSubresourceRange}{@code ::aspectMask} member of each element of the {@code pRanges} array must not include bits other than {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT} or {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}
  • *
  • If the {@code image}’s format does not have a stencil component, then the {@link VkImageSubresourceRange}{@code ::aspectMask} member of each element of the {@code pRanges} array must not include the {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT} bit
  • *
  • If the {@code image}’s format does not have a depth component, then the {@link VkImageSubresourceRange}{@code ::aspectMask} member of each element of the {@code pRanges} array must not include the {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT} bit
  • *
  • The {@link VkImageSubresourceRange}{@code ::baseMipLevel} members of the elements of the {@code pRanges} array must each be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • For each {@link VkImageSubresourceRange} element of {@code pRanges}, if the {@code levelCount} member is not {@link #VK_REMAINING_MIP_LEVELS REMAINING_MIP_LEVELS}, then baseMipLevel + levelCount must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • The {@link VkImageSubresourceRange}{@code ::baseArrayLayer} members of the elements of the {@code pRanges} array must each be less than the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • For each {@link VkImageSubresourceRange} element of {@code pRanges}, if the {@code layerCount} member is not {@link #VK_REMAINING_ARRAY_LAYERS REMAINING_ARRAY_LAYERS}, then baseArrayLayer + layerCount must be less than the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • {@code image} must have a depth/stencil format
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code image} must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code image} must not be an unprotected image
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code image} must be a valid {@code VkImage} handle
  • *
  • {@code imageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pDepthStencil} must be a valid pointer to a valid {@link VkClearDepthStencilValue} structure
  • *
  • {@code pRanges} must be a valid pointer to an array of {@code rangeCount} valid {@link VkImageSubresourceRange} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code rangeCount} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code image} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics
* *
See Also
* *

{@link VkClearDepthStencilValue}, {@link VkImageSubresourceRange}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param image the image to be cleared. * @param imageLayout specifies the current layout of the image subresource ranges to be cleared, and must be {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL} or {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL}. * @param pDepthStencil a pointer to a {@link VkClearDepthStencilValue} structure containing the values that the depth and stencil image subresource ranges will be cleared to (see Clear Values below). * @param pRanges a pointer to an array of {@link VkImageSubresourceRange} structures describing a range of mipmap levels, array layers, and aspects to be cleared, as described in Image Views. */ public static void vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, @NativeType("VkImage") long image, @NativeType("VkImageLayout") int imageLayout, @NativeType("VkClearDepthStencilValue const *") VkClearDepthStencilValue pDepthStencil, @NativeType("VkImageSubresourceRange const *") VkImageSubresourceRange.Buffer pRanges) { nvkCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil.address(), pRanges.remaining(), pRanges.address()); } /** * Fill regions of a combined depth/stencil image. * *
C Specification
* *

To clear one or more subranges of a depth/stencil image, call:

* *

     * void vkCmdClearDepthStencilImage(
     *     VkCommandBuffer                             commandBuffer,
     *     VkImage                                     image,
     *     VkImageLayout                               imageLayout,
     *     const VkClearDepthStencilValue*             pDepthStencil,
     *     uint32_t                                    rangeCount,
     *     const VkImageSubresourceRange*              pRanges);
* *
Valid Usage
* *
    *
  • The format features of {@code image} must contain {@link VK11#VK_FORMAT_FEATURE_TRANSFER_DST_BIT FORMAT_FEATURE_TRANSFER_DST_BIT}
  • *
  • If the {@code aspect} member of any element of {@code pRanges} includes {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}, and {@code image} was created with {@link VkImageStencilUsageCreateInfo separate stencil usage}, {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} must have been included in the {@link VkImageStencilUsageCreateInfo}{@code ::stencilUsage} used to create {@code image}
  • *
  • If the {@code aspect} member of any element of {@code pRanges} includes {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}, and {@code image} was not created with {@link VkImageStencilUsageCreateInfo separate stencil usage}, {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} must have been included in the {@link VkImageCreateInfo}{@code ::usage} used to create {@code image}
  • *
  • If the {@code aspect} member of any element of {@code pRanges} includes {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT}, {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} must have been included in the {@link VkImageCreateInfo}{@code ::usage} used to create {@code image}
  • *
  • If {@code image} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code imageLayout} must specify the layout of the image subresource ranges of {@code image} specified in {@code pRanges} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code imageLayout} must be either of {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL} or {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}
  • *
  • The {@link VkImageSubresourceRange}{@code ::aspectMask} member of each element of the {@code pRanges} array must not include bits other than {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT} or {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}
  • *
  • If the {@code image}’s format does not have a stencil component, then the {@link VkImageSubresourceRange}{@code ::aspectMask} member of each element of the {@code pRanges} array must not include the {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT} bit
  • *
  • If the {@code image}’s format does not have a depth component, then the {@link VkImageSubresourceRange}{@code ::aspectMask} member of each element of the {@code pRanges} array must not include the {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT} bit
  • *
  • The {@link VkImageSubresourceRange}{@code ::baseMipLevel} members of the elements of the {@code pRanges} array must each be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • For each {@link VkImageSubresourceRange} element of {@code pRanges}, if the {@code levelCount} member is not {@link #VK_REMAINING_MIP_LEVELS REMAINING_MIP_LEVELS}, then baseMipLevel + levelCount must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • The {@link VkImageSubresourceRange}{@code ::baseArrayLayer} members of the elements of the {@code pRanges} array must each be less than the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • For each {@link VkImageSubresourceRange} element of {@code pRanges}, if the {@code layerCount} member is not {@link #VK_REMAINING_ARRAY_LAYERS REMAINING_ARRAY_LAYERS}, then baseArrayLayer + layerCount must be less than the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code image} was created
  • *
  • {@code image} must have a depth/stencil format
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code image} must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code image} must not be an unprotected image
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code image} must be a valid {@code VkImage} handle
  • *
  • {@code imageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pDepthStencil} must be a valid pointer to a valid {@link VkClearDepthStencilValue} structure
  • *
  • {@code pRanges} must be a valid pointer to an array of {@code rangeCount} valid {@link VkImageSubresourceRange} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code rangeCount} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code image} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics
* *
See Also
* *

{@link VkClearDepthStencilValue}, {@link VkImageSubresourceRange}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param image the image to be cleared. * @param imageLayout specifies the current layout of the image subresource ranges to be cleared, and must be {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL} or {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL}. * @param pDepthStencil a pointer to a {@link VkClearDepthStencilValue} structure containing the values that the depth and stencil image subresource ranges will be cleared to (see Clear Values below). */ public static void vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, @NativeType("VkImage") long image, @NativeType("VkImageLayout") int imageLayout, @NativeType("VkClearDepthStencilValue const *") VkClearDepthStencilValue pDepthStencil, @NativeType("VkImageSubresourceRange const *") VkImageSubresourceRange pRange) { nvkCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil.address(), 1, pRange.address()); } // --- [ vkCmdClearAttachments ] --- /** * Unsafe version of: {@link #vkCmdClearAttachments CmdClearAttachments} * * @param attachmentCount the number of entries in the {@code pAttachments} array. * @param rectCount the number of entries in the {@code pRects} array. */ public static void nvkCmdClearAttachments(VkCommandBuffer commandBuffer, int attachmentCount, long pAttachments, int rectCount, long pRects) { long __functionAddress = commandBuffer.getCapabilities().vkCmdClearAttachments; callPPPV(commandBuffer.address(), attachmentCount, pAttachments, rectCount, pRects, __functionAddress); } /** * Clear regions within bound framebuffer attachments. * *
C Specification
* *

To clear one or more regions of color and depth/stencil attachments inside a render pass instance, call:

* *

     * void vkCmdClearAttachments(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    attachmentCount,
     *     const VkClearAttachment*                    pAttachments,
     *     uint32_t                                    rectCount,
     *     const VkClearRect*                          pRects);
* *
Description
* *

If the render pass has a fragment density map attachment, clears follow the operations of fragment density maps as if each clear region was a primitive which generates fragments. The clear color is applied to all pixels inside each fragment’s area regardless if the pixels lie outside of the clear region. Clears may have a different set of supported fragment areas than draws.

* *

Unlike other clear commands, {@link #vkCmdClearAttachments CmdClearAttachments} executes as a drawing command, rather than a transfer command, with writes performed by it executing in rasterization order. Clears to color attachments are executed as color attachment writes, by the {@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT} stage. Clears to depth/stencil attachments are executed as depth writes and writes by the {@link #VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT} and {@link #VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT} stages.

* *

{@code vkCmdClearAttachments} is not affected by the bound pipeline state.

* *
Note
* *

It’s generally advised that attachments are cleared by using the {@link #VK_ATTACHMENT_LOAD_OP_CLEAR ATTACHMENT_LOAD_OP_CLEAR} load operation at the start of rendering, which will be more efficient on some implementations.

*
* *
Valid Usage
* *
    *
  • If the {@code aspectMask} member of any element of {@code pAttachments} contains {@link #VK_IMAGE_ASPECT_COLOR_BIT IMAGE_ASPECT_COLOR_BIT}, then the {@code colorAttachment} member of that element must either refer to a color attachment which is {@link #VK_ATTACHMENT_UNUSED ATTACHMENT_UNUSED}, or must be a valid color attachment
  • *
  • If the {@code aspectMask} member of any element of {@code pAttachments} contains {@link #VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT}, then the current subpass' depth/stencil attachment must either be {@link #VK_ATTACHMENT_UNUSED ATTACHMENT_UNUSED}, or must have a depth component
  • *
  • If the {@code aspectMask} member of any element of {@code pAttachments} contains {@link #VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}, then the current subpass' depth/stencil attachment must either be {@link #VK_ATTACHMENT_UNUSED ATTACHMENT_UNUSED}, or must have a stencil component
  • *
  • The {@code rect} member of each element of {@code pRects} must have an {@code extent.width} greater than 0
  • *
  • The {@code rect} member of each element of {@code pRects} must have an {@code extent.height} greater than 0
  • *
  • The rectangular region specified by each element of {@code pRects} must be contained within the render area of the current render pass instance
  • *
  • The layers specified by each element of {@code pRects} must be contained within every attachment that {@code pAttachments} refers to
  • *
  • The {@code layerCount} member of each element of {@code pRects} must not be 0
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, each attachment to be cleared must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, each attachment to be cleared must not be an unprotected image
  • *
  • If the render pass instance this is recorded in uses multiview, then {@code baseArrayLayer} must be zero and {@code layerCount} must be one
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pAttachments} must be a valid pointer to an array of {@code attachmentCount} valid {@link VkClearAttachment} structures
  • *
  • {@code pRects} must be a valid pointer to an array of {@code rectCount} {@link VkClearRect} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called inside of a render pass instance
  • *
  • {@code attachmentCount} must be greater than 0
  • *
  • {@code rectCount} must be greater than 0
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryInsideGraphics
* *
See Also
* *

{@link VkClearAttachment}, {@link VkClearRect}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param pAttachments a pointer to an array of {@link VkClearAttachment} structures defining the attachments to clear and the clear values to use. If any attachment index to be cleared is not backed by an image view, then the clear has no effect. * @param pRects a pointer to an array of {@link VkClearRect} structures defining regions within each selected attachment to clear. */ public static void vkCmdClearAttachments(VkCommandBuffer commandBuffer, @NativeType("VkClearAttachment const *") VkClearAttachment.Buffer pAttachments, @NativeType("VkClearRect const *") VkClearRect.Buffer pRects) { nvkCmdClearAttachments(commandBuffer, pAttachments.remaining(), pAttachments.address(), pRects.remaining(), pRects.address()); } // --- [ vkCmdResolveImage ] --- /** * Unsafe version of: {@link #vkCmdResolveImage CmdResolveImage} * * @param regionCount the number of regions to resolve. */ public static void nvkCmdResolveImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, int regionCount, long pRegions) { long __functionAddress = commandBuffer.getCapabilities().vkCmdResolveImage; callPJJPV(commandBuffer.address(), srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, __functionAddress); } /** * Resolve regions of an image. * *
C Specification
* *

To resolve a multisample color image to a non-multisample color image, call:

* *

     * void vkCmdResolveImage(
     *     VkCommandBuffer                             commandBuffer,
     *     VkImage                                     srcImage,
     *     VkImageLayout                               srcImageLayout,
     *     VkImage                                     dstImage,
     *     VkImageLayout                               dstImageLayout,
     *     uint32_t                                    regionCount,
     *     const VkImageResolve*                       pRegions);
* *
Description
* *

During the resolve the samples corresponding to each pixel location in the source are converted to a single sample before being written to the destination. If the source formats are floating-point or normalized types, the sample values for each pixel are resolved in an implementation-dependent manner. If the source formats are integer types, a single sample’s value is selected for each pixel.

* *

{@code srcOffset} and {@code dstOffset} select the initial {@code x}, {@code y}, and {@code z} offsets in texels of the sub-regions of the source and destination image data. {@code extent} is the size in texels of the source image to resolve in {@code width}, {@code height} and {@code depth}. Each element of {@code pRegions} must be a region that is contained within its corresponding image.

* *

Resolves are done layer by layer starting with {@code baseArrayLayer} member of {@code srcSubresource} for the source and {@code dstSubresource} for the destination. {@code layerCount} layers are resolved to the destination image.

* *
Valid Usage
* *
    *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code srcImage} must not be a protected image
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be an unprotected image
  • *
* *
    *
  • The union of all source regions, and the union of all destination regions, specified by the elements of {@code pRegions}, must not overlap in memory
  • *
  • If {@code srcImage} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code srcImage} must have a sample count equal to any valid sample count value other than {@link #VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT}
  • *
  • If {@code dstImage} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstImage} must have a sample count equal to {@link #VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT}
  • *
  • {@code srcImageLayout} must specify the layout of the image subresources of {@code srcImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code srcImageLayout} must be {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}, {@link #VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL} or {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}
  • *
  • {@code dstImageLayout} must specify the layout of the image subresources of {@code dstImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code dstImageLayout} must be {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}, {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL} or {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}
  • *
  • The format features of {@code dstImage} must contain {@link #VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BIT}
  • *
  • {@code srcImage} and {@code dstImage} must have been created with the same image format
  • *
  • The {@code srcSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The {@code dstSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • {@code dstImage} and {@code srcImage} must not have been created with {@code flags} containing {@link EXTFragmentDensityMap#VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT IMAGE_CREATE_SUBSAMPLED_BIT_EXT}
  • *
  • If either {@code srcImage} or {@code dstImage} are of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, then for each element of {@code pRegions}, {@code srcSubresource.baseArrayLayer} must be 0 and {@code srcSubresource.layerCount} must be 1
  • *
  • If either {@code srcImage} or {@code dstImage} are of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, then for each element of {@code pRegions}, {@code dstSubresource.baseArrayLayer} must be 0 and {@code dstSubresource.layerCount} must be 1
  • *
  • For each element of {@code pRegions}, {@code srcOffset.x} and (extent.width + srcOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • For each element of {@code pRegions}, {@code srcOffset.y} and (extent.height + srcOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code srcOffset.y} must be 0 and {@code extent.height} must be 1
  • *
  • For each element of {@code pRegions}, {@code srcOffset.z} and (extent.depth + srcOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} or {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code srcOffset.z} must be 0 and {@code extent.depth} must be 1
  • *
  • For each element of {@code pRegions}, {@code dstOffset.x} and (extent.width + dstOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • For each element of {@code pRegions}, {@code dstOffset.y} and (extent.height + dstOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code dstOffset.y} must be 0 and {@code extent.height} must be 1
  • *
  • For each element of {@code pRegions}, {@code dstOffset.z} and (extent.depth + dstOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} or {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code dstOffset.z} must be 0 and {@code extent.depth} must be 1
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code srcImage} must be a valid {@code VkImage} handle
  • *
  • {@code srcImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code dstImage} must be a valid {@code VkImage} handle
  • *
  • {@code dstImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pRegions} must be a valid pointer to an array of {@code regionCount} valid {@link VkImageResolve} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code regionCount} must be greater than 0
  • *
  • Each of {@code commandBuffer}, {@code dstImage}, and {@code srcImage} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics
* *
See Also
* *

{@link VkImageResolve}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param srcImage the source image. * @param srcImageLayout the layout of the source image subresources for the resolve. * @param dstImage the destination image. * @param dstImageLayout the layout of the destination image subresources for the resolve. * @param pRegions a pointer to an array of {@link VkImageResolve} structures specifying the regions to resolve. */ public static void vkCmdResolveImage(VkCommandBuffer commandBuffer, @NativeType("VkImage") long srcImage, @NativeType("VkImageLayout") int srcImageLayout, @NativeType("VkImage") long dstImage, @NativeType("VkImageLayout") int dstImageLayout, @NativeType("VkImageResolve const *") VkImageResolve.Buffer pRegions) { nvkCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, pRegions.remaining(), pRegions.address()); } /** * Resolve regions of an image. * *
C Specification
* *

To resolve a multisample color image to a non-multisample color image, call:

* *

     * void vkCmdResolveImage(
     *     VkCommandBuffer                             commandBuffer,
     *     VkImage                                     srcImage,
     *     VkImageLayout                               srcImageLayout,
     *     VkImage                                     dstImage,
     *     VkImageLayout                               dstImageLayout,
     *     uint32_t                                    regionCount,
     *     const VkImageResolve*                       pRegions);
* *
Description
* *

During the resolve the samples corresponding to each pixel location in the source are converted to a single sample before being written to the destination. If the source formats are floating-point or normalized types, the sample values for each pixel are resolved in an implementation-dependent manner. If the source formats are integer types, a single sample’s value is selected for each pixel.

* *

{@code srcOffset} and {@code dstOffset} select the initial {@code x}, {@code y}, and {@code z} offsets in texels of the sub-regions of the source and destination image data. {@code extent} is the size in texels of the source image to resolve in {@code width}, {@code height} and {@code depth}. Each element of {@code pRegions} must be a region that is contained within its corresponding image.

* *

Resolves are done layer by layer starting with {@code baseArrayLayer} member of {@code srcSubresource} for the source and {@code dstSubresource} for the destination. {@code layerCount} layers are resolved to the destination image.

* *
Valid Usage
* *
    *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code srcImage} must not be a protected image
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be a protected image
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, {@code dstImage} must not be an unprotected image
  • *
* *
    *
  • The union of all source regions, and the union of all destination regions, specified by the elements of {@code pRegions}, must not overlap in memory
  • *
  • If {@code srcImage} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code srcImage} must have a sample count equal to any valid sample count value other than {@link #VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT}
  • *
  • If {@code dstImage} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstImage} must have a sample count equal to {@link #VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT}
  • *
  • {@code srcImageLayout} must specify the layout of the image subresources of {@code srcImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code srcImageLayout} must be {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}, {@link #VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL} or {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}
  • *
  • {@code dstImageLayout} must specify the layout of the image subresources of {@code dstImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code dstImageLayout} must be {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}, {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL} or {@link #VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}
  • *
  • The format features of {@code dstImage} must contain {@link #VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BIT}
  • *
  • {@code srcImage} and {@code dstImage} must have been created with the same image format
  • *
  • The {@code srcSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The {@code dstSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code srcImage} was created
  • *
  • The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • {@code dstImage} and {@code srcImage} must not have been created with {@code flags} containing {@link EXTFragmentDensityMap#VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT IMAGE_CREATE_SUBSAMPLED_BIT_EXT}
  • *
  • If either {@code srcImage} or {@code dstImage} are of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, then for each element of {@code pRegions}, {@code srcSubresource.baseArrayLayer} must be 0 and {@code srcSubresource.layerCount} must be 1
  • *
  • If either {@code srcImage} or {@code dstImage} are of type {@link #VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, then for each element of {@code pRegions}, {@code dstSubresource.baseArrayLayer} must be 0 and {@code dstSubresource.layerCount} must be 1
  • *
  • For each element of {@code pRegions}, {@code srcOffset.x} and (extent.width + srcOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • For each element of {@code pRegions}, {@code srcOffset.y} and (extent.height + srcOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code srcOffset.y} must be 0 and {@code extent.height} must be 1
  • *
  • For each element of {@code pRegions}, {@code srcOffset.z} and (extent.depth + srcOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code srcSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} or {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code srcOffset.z} must be 0 and {@code extent.depth} must be 1
  • *
  • For each element of {@code pRegions}, {@code dstOffset.x} and (extent.width + dstOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • For each element of {@code pRegions}, {@code dstOffset.y} and (extent.height + dstOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code dstOffset.y} must be 0 and {@code extent.height} must be 1
  • *
  • For each element of {@code pRegions}, {@code dstOffset.z} and (extent.depth + dstOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code dstSubresource} of {@code dstImage}
  • *
  • If {@code dstImage} is of type {@link #VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} or {@link #VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code dstOffset.z} must be 0 and {@code extent.depth} must be 1
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code srcImage} must be a valid {@code VkImage} handle
  • *
  • {@code srcImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code dstImage} must be a valid {@code VkImage} handle
  • *
  • {@code dstImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pRegions} must be a valid pointer to an array of {@code regionCount} valid {@link VkImageResolve} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code regionCount} must be greater than 0
  • *
  • Each of {@code commandBuffer}, {@code dstImage}, and {@code srcImage} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics
* *
See Also
* *

{@link VkImageResolve}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param srcImage the source image. * @param srcImageLayout the layout of the source image subresources for the resolve. * @param dstImage the destination image. * @param dstImageLayout the layout of the destination image subresources for the resolve. */ public static void vkCmdResolveImage(VkCommandBuffer commandBuffer, @NativeType("VkImage") long srcImage, @NativeType("VkImageLayout") int srcImageLayout, @NativeType("VkImage") long dstImage, @NativeType("VkImageLayout") int dstImageLayout, @NativeType("VkImageResolve const *") VkImageResolve pRegion) { nvkCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, 1, pRegion.address()); } // --- [ vkCmdSetEvent ] --- /** * Set an event object to signaled state. * *
C Specification
* *

To set the state of an event to signaled from a device, call:

* *

     * void vkCmdSetEvent(
     *     VkCommandBuffer                             commandBuffer,
     *     VkEvent                                     event,
     *     VkPipelineStageFlags                        stageMask);
* *
Description
* *

{@code vkCmdSetEvent} behaves identically to {@link KHRSynchronization2#vkCmdSetEvent2KHR CmdSetEvent2KHR}, except that it does not define an access scope, and must only be used with {@link #vkCmdWaitEvents CmdWaitEvents}, not {@link KHRSynchronization2#vkCmdWaitEvents2KHR CmdWaitEvents2KHR}.

* *
Valid Usage
* *
    *
  • If the geometry shaders feature is not enabled, {@code stageMask} must not contain {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}
  • *
  • If the tessellation shaders feature is not enabled, {@code stageMask} must not contain {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT} or {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}
  • *
  • If the conditional rendering feature is not enabled, {@code stageMask} must not contain {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT}
  • *
  • If the fragment density map feature is not enabled, {@code stageMask} must not contain {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT}
  • *
  • If the transform feedback feature is not enabled, {@code stageMask} must not contain {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
  • *
  • If the mesh shaders feature is not enabled, {@code stageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}
  • *
  • If the task shaders feature is not enabled, {@code stageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}
  • *
  • If the shading rate image feature is not enabled, {@code stageMask} must not contain {@link NVShadingRateImage#VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV}
  • *
  • Any pipeline stage included in {@code stageMask} must be supported by the capabilities of the queue family specified by the {@code queueFamilyIndex} member of the {@link VkCommandPoolCreateInfo} structure that was used to create the {@code VkCommandPool} that {@code commandBuffer} was allocated from, as specified in the table of supported pipeline stages
  • *
  • If the {@code synchronization2} feature is not enabled, {@code stageMask} must not be 0
  • *
  • {@code stageMask} must not include {@link #VK_PIPELINE_STAGE_HOST_BIT PIPELINE_STAGE_HOST_BIT}
  • *
  • {@code commandBuffer}’s current device mask must include exactly one physical device
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code event} must be a valid {@code VkEvent} handle
  • *
  • {@code stageMask} must be a valid combination of {@code VkPipelineStageFlagBits} values
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • Both of {@code commandBuffer}, and {@code event} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics Compute
* * @param commandBuffer the command buffer into which the command is recorded. * @param event the event that will be signaled. * @param stageMask specifies the source stage mask used to determine the first synchronization scope. */ public static void vkCmdSetEvent(VkCommandBuffer commandBuffer, @NativeType("VkEvent") long event, @NativeType("VkPipelineStageFlags") int stageMask) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetEvent; callPJV(commandBuffer.address(), event, stageMask, __functionAddress); } // --- [ vkCmdResetEvent ] --- /** * Reset an event object to non-signaled state. * *
C Specification
* *

To set the state of an event to unsignaled from a device, call:

* *

     * void vkCmdResetEvent(
     *     VkCommandBuffer                             commandBuffer,
     *     VkEvent                                     event,
     *     VkPipelineStageFlags                        stageMask);
* *
Description
* *

{@code vkCmdResetEvent} behaves identically to {@link KHRSynchronization2#vkCmdResetEvent2KHR CmdResetEvent2KHR}.

* *
Valid Usage
* *
    *
  • If the geometry shaders feature is not enabled, {@code stageMask} must not contain {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}
  • *
  • If the tessellation shaders feature is not enabled, {@code stageMask} must not contain {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT} or {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}
  • *
  • If the conditional rendering feature is not enabled, {@code stageMask} must not contain {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT}
  • *
  • If the fragment density map feature is not enabled, {@code stageMask} must not contain {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT}
  • *
  • If the transform feedback feature is not enabled, {@code stageMask} must not contain {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
  • *
  • If the mesh shaders feature is not enabled, {@code stageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}
  • *
  • If the task shaders feature is not enabled, {@code stageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}
  • *
  • If the shading rate image feature is not enabled, {@code stageMask} must not contain {@link NVShadingRateImage#VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV}
  • *
  • Any pipeline stage included in {@code stageMask} must be supported by the capabilities of the queue family specified by the {@code queueFamilyIndex} member of the {@link VkCommandPoolCreateInfo} structure that was used to create the {@code VkCommandPool} that {@code commandBuffer} was allocated from, as specified in the table of supported pipeline stages
  • *
  • If the {@code synchronization2} feature is not enabled, {@code stageMask} must not be 0
  • *
  • {@code stageMask} must not include {@link #VK_PIPELINE_STAGE_HOST_BIT PIPELINE_STAGE_HOST_BIT}
  • *
  • There must be an execution dependency between {@code vkCmdResetEvent} and the execution of any {@link #vkCmdWaitEvents CmdWaitEvents} that includes {@code event} in its {@code pEvents} parameter
  • *
  • There must be an execution dependency between {@code vkCmdResetEvent} and the execution of any {@link KHRSynchronization2#vkCmdWaitEvents2KHR CmdWaitEvents2KHR} that includes {@code event} in its {@code pEvents} parameter
  • *
  • {@code commandBuffer}’s current device mask must include exactly one physical device
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code event} must be a valid {@code VkEvent} handle
  • *
  • {@code stageMask} must be a valid combination of {@code VkPipelineStageFlagBits} values
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • Both of {@code commandBuffer}, and {@code event} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics Compute
* * @param commandBuffer the command buffer into which the command is recorded. * @param event the event that will be unsignaled. * @param stageMask a bitmask of {@code VkPipelineStageFlagBits} specifying the source stage mask used to determine when the {@code event} is unsignaled. */ public static void vkCmdResetEvent(VkCommandBuffer commandBuffer, @NativeType("VkEvent") long event, @NativeType("VkPipelineStageFlags") int stageMask) { long __functionAddress = commandBuffer.getCapabilities().vkCmdResetEvent; callPJV(commandBuffer.address(), event, stageMask, __functionAddress); } // --- [ vkCmdWaitEvents ] --- /** * Unsafe version of: {@link #vkCmdWaitEvents CmdWaitEvents} * * @param eventCount the length of the {@code pEvents} array. * @param memoryBarrierCount the length of the {@code pMemoryBarriers} array. * @param bufferMemoryBarrierCount the length of the {@code pBufferMemoryBarriers} array. * @param imageMemoryBarrierCount the length of the {@code pImageMemoryBarriers} array. */ public static void nvkCmdWaitEvents(VkCommandBuffer commandBuffer, int eventCount, long pEvents, int srcStageMask, int dstStageMask, int memoryBarrierCount, long pMemoryBarriers, int bufferMemoryBarrierCount, long pBufferMemoryBarriers, int imageMemoryBarrierCount, long pImageMemoryBarriers) { long __functionAddress = commandBuffer.getCapabilities().vkCmdWaitEvents; callPPPPPV(commandBuffer.address(), eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, __functionAddress); } /** * Wait for one or more events and insert a set of memory. * *
C Specification
* *

To wait for one or more events to enter the signaled state on a device, call:

* *

     * void vkCmdWaitEvents(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    eventCount,
     *     const VkEvent*                              pEvents,
     *     VkPipelineStageFlags                        srcStageMask,
     *     VkPipelineStageFlags                        dstStageMask,
     *     uint32_t                                    memoryBarrierCount,
     *     const VkMemoryBarrier*                      pMemoryBarriers,
     *     uint32_t                                    bufferMemoryBarrierCount,
     *     const VkBufferMemoryBarrier*                pBufferMemoryBarriers,
     *     uint32_t                                    imageMemoryBarrierCount,
     *     const VkImageMemoryBarrier*                 pImageMemoryBarriers);
* *
Description
* *

{@code vkCmdWaitEvents} is largely similar to {@link KHRSynchronization2#vkCmdWaitEvents2KHR CmdWaitEvents2KHR}, but can only wait on signal operations defined by {@link #vkCmdSetEvent CmdSetEvent}. As {@link #vkCmdSetEvent CmdSetEvent} does not define any access scopes, {@code vkCmdWaitEvents} defines the first access scope for each event signal operation in addition to its own access scopes.

* *
Note
* *

Since {@link #vkCmdSetEvent CmdSetEvent} does not have any dependency information beyond a stage mask, implementations do not have the same opportunity to perform availability and visibility operations or image layout transitions in advance as they do with {@link KHRSynchronization2#vkCmdSetEvent2KHR CmdSetEvent2KHR} and {@link KHRSynchronization2#vkCmdWaitEvents2KHR CmdWaitEvents2KHR}.

*
* *

When {@code vkCmdWaitEvents} is submitted to a queue, it defines a memory dependency between prior event signal operations on the same queue or the host, and subsequent commands. {@code vkCmdWaitEvents} must not be used to wait on event signal operations occurring on other queues.

* *

The first synchronization scope only includes event signal operations that operate on members of {@code pEvents}, and the operations that happened-before the event signal operations. Event signal operations performed by {@link #vkCmdSetEvent CmdSetEvent} that occur earlier in submission order are included in the first synchronization scope, if the logically latest pipeline stage in their {@code stageMask} parameter is logically earlier than or equal to the logically latest pipeline stage in {@code srcStageMask}. Event signal operations performed by {@link #vkSetEvent SetEvent} are only included in the first synchronization scope if {@link #VK_PIPELINE_STAGE_HOST_BIT PIPELINE_STAGE_HOST_BIT} is included in {@code srcStageMask}.

* *

The second synchronization scope includes all commands that occur later in submission order. The second synchronization scope is limited to operations on the pipeline stages determined by the destination stage mask specified by {@code dstStageMask}.

* *

The first access scope is limited to accesses in the pipeline stages determined by the source stage mask specified by {@code srcStageMask}. Within that, the first access scope only includes the first access scopes defined by elements of the {@code pMemoryBarriers}, {@code pBufferMemoryBarriers} and {@code pImageMemoryBarriers} arrays, which each define a set of memory barriers. If no memory barriers are specified, then the first access scope includes no accesses.

* *

The second access scope is limited to accesses in the pipeline stages determined by the destination stage mask specified by {@code dstStageMask}. Within that, the second access scope only includes the second access scopes defined by elements of the {@code pMemoryBarriers}, {@code pBufferMemoryBarriers} and {@code pImageMemoryBarriers} arrays, which each define a set of memory barriers. If no memory barriers are specified, then the second access scope includes no accesses.

* *
Valid Usage
* *
    *
  • If the geometry shaders feature is not enabled, {@code srcStageMask} must not contain {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}
  • *
  • If the tessellation shaders feature is not enabled, {@code srcStageMask} must not contain {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT} or {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}
  • *
  • If the conditional rendering feature is not enabled, {@code srcStageMask} must not contain {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT}
  • *
  • If the fragment density map feature is not enabled, {@code srcStageMask} must not contain {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT}
  • *
  • If the transform feedback feature is not enabled, {@code srcStageMask} must not contain {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
  • *
  • If the mesh shaders feature is not enabled, {@code srcStageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}
  • *
  • If the task shaders feature is not enabled, {@code srcStageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}
  • *
  • If the shading rate image feature is not enabled, {@code srcStageMask} must not contain {@link NVShadingRateImage#VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV}
  • *
  • Any pipeline stage included in {@code srcStageMask} must be supported by the capabilities of the queue family specified by the {@code queueFamilyIndex} member of the {@link VkCommandPoolCreateInfo} structure that was used to create the {@code VkCommandPool} that {@code commandBuffer} was allocated from, as specified in the table of supported pipeline stages
  • *
  • If the {@code synchronization2} feature is not enabled, {@code srcStageMask} must not be 0
  • *
* *
    *
  • If the geometry shaders feature is not enabled, {@code dstStageMask} must not contain {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}
  • *
  • If the tessellation shaders feature is not enabled, {@code dstStageMask} must not contain {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT} or {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}
  • *
  • If the conditional rendering feature is not enabled, {@code dstStageMask} must not contain {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT}
  • *
  • If the fragment density map feature is not enabled, {@code dstStageMask} must not contain {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT}
  • *
  • If the transform feedback feature is not enabled, {@code dstStageMask} must not contain {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
  • *
  • If the mesh shaders feature is not enabled, {@code dstStageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}
  • *
  • If the task shaders feature is not enabled, {@code dstStageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}
  • *
  • If the shading rate image feature is not enabled, {@code dstStageMask} must not contain {@link NVShadingRateImage#VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV}
  • *
  • Any pipeline stage included in {@code dstStageMask} must be supported by the capabilities of the queue family specified by the {@code queueFamilyIndex} member of the {@link VkCommandPoolCreateInfo} structure that was used to create the {@code VkCommandPool} that {@code commandBuffer} was allocated from, as specified in the table of supported pipeline stages
  • *
  • If the {@code synchronization2} feature is not enabled, {@code dstStageMask} must not be 0
  • *
* *
    *
  • The {@code srcAccessMask} member of each element of {@code pMemoryBarriers} must only include access flags that are supported by one or more of the pipeline stages in {@code srcStageMask}, as specified in the table of supported access types
  • *
  • The {@code dstAccessMask} member of each element of {@code pMemoryBarriers} must only include access flags that are supported by one or more of the pipeline stages in {@code dstStageMask}, as specified in the table of supported access types
  • *
  • For any element of {@code pBufferMemoryBarriers}, if its {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members are equal, or if its {@code srcQueueFamilyIndex} is the queue family index that was used to create the command pool that {@code commandBuffer} was allocated from, then its {@code srcAccessMask} member must only contain access flags that are supported by one or more of the pipeline stages in {@code srcStageMask}, as specified in the table of supported access types
  • *
  • For any element of {@code pBufferMemoryBarriers}, if its {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members are equal, or if its {@code dstQueueFamilyIndex} is the queue family index that was used to create the command pool that {@code commandBuffer} was allocated from, then its {@code dstAccessMask} member must only contain access flags that are supported by one or more of the pipeline stages in {@code dstStageMask}, as specified in the table of supported access types
  • *
  • For any element of {@code pImageMemoryBarriers}, if its {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members are equal, or if its {@code srcQueueFamilyIndex} is the queue family index that was used to create the command pool that {@code commandBuffer} was allocated from, then its {@code srcAccessMask} member must only contain access flags that are supported by one or more of the pipeline stages in {@code srcStageMask}, as specified in the table of supported access types
  • *
  • For any element of {@code pImageMemoryBarriers}, if its {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members are equal, or if its {@code dstQueueFamilyIndex} is the queue family index that was used to create the command pool that {@code commandBuffer} was allocated from, then its {@code dstAccessMask} member must only contain access flags that are supported by one or more of the pipeline stages in {@code dstStageMask}, as specified in the table of supported access types
  • *
  • {@code srcStageMask} must be the bitwise OR of the {@code stageMask} parameter used in previous calls to {@code vkCmdSetEvent} with any of the elements of {@code pEvents} and {@link #VK_PIPELINE_STAGE_HOST_BIT PIPELINE_STAGE_HOST_BIT} if any of the elements of {@code pEvents} was set using {@code vkSetEvent}
  • *
  • If {@code pEvents} includes one or more events that will be signaled by {@code vkSetEvent} after {@code commandBuffer} has been submitted to a queue, then {@code vkCmdWaitEvents} must not be called inside a render pass instance
  • *
  • The {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members of any element of {@code pBufferMemoryBarriers} or {@code pImageMemoryBarriers} must be equal
  • *
  • {@code commandBuffer}’s current device mask must include exactly one physical device
  • *
  • Elements of {@code pEvents} must not have been signaled by {@link KHRSynchronization2#vkCmdSetEvent2KHR CmdSetEvent2KHR}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pEvents} must be a valid pointer to an array of {@code eventCount} valid {@code VkEvent} handles
  • *
  • {@code srcStageMask} must be a valid combination of {@code VkPipelineStageFlagBits} values
  • *
  • {@code dstStageMask} must be a valid combination of {@code VkPipelineStageFlagBits} values
  • *
  • If {@code memoryBarrierCount} is not 0, {@code pMemoryBarriers} must be a valid pointer to an array of {@code memoryBarrierCount} valid {@link VkMemoryBarrier} structures
  • *
  • If {@code bufferMemoryBarrierCount} is not 0, {@code pBufferMemoryBarriers} must be a valid pointer to an array of {@code bufferMemoryBarrierCount} valid {@link VkBufferMemoryBarrier} structures
  • *
  • If {@code imageMemoryBarrierCount} is not 0, {@code pImageMemoryBarriers} must be a valid pointer to an array of {@code imageMemoryBarrierCount} valid {@link VkImageMemoryBarrier} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • {@code eventCount} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and the elements of {@code pEvents} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* *
See Also
* *

{@link VkBufferMemoryBarrier}, {@link VkImageMemoryBarrier}, {@link VkMemoryBarrier}

* * @param commandBuffer the command buffer into which the command is recorded. * @param pEvents a pointer to an array of event object handles to wait on. * @param srcStageMask a bitmask of {@code VkPipelineStageFlagBits} specifying the source stage mask. * @param dstStageMask a bitmask of {@code VkPipelineStageFlagBits} specifying the destination stage mask. * @param pMemoryBarriers a pointer to an array of {@link VkMemoryBarrier} structures. * @param pBufferMemoryBarriers a pointer to an array of {@link VkBufferMemoryBarrier} structures. * @param pImageMemoryBarriers a pointer to an array of {@link VkImageMemoryBarrier} structures. */ public static void vkCmdWaitEvents(VkCommandBuffer commandBuffer, @NativeType("VkEvent const *") LongBuffer pEvents, @NativeType("VkPipelineStageFlags") int srcStageMask, @NativeType("VkPipelineStageFlags") int dstStageMask, @Nullable @NativeType("VkMemoryBarrier const *") VkMemoryBarrier.Buffer pMemoryBarriers, @Nullable @NativeType("VkBufferMemoryBarrier const *") VkBufferMemoryBarrier.Buffer pBufferMemoryBarriers, @Nullable @NativeType("VkImageMemoryBarrier const *") VkImageMemoryBarrier.Buffer pImageMemoryBarriers) { nvkCmdWaitEvents(commandBuffer, pEvents.remaining(), memAddress(pEvents), srcStageMask, dstStageMask, remainingSafe(pMemoryBarriers), memAddressSafe(pMemoryBarriers), remainingSafe(pBufferMemoryBarriers), memAddressSafe(pBufferMemoryBarriers), remainingSafe(pImageMemoryBarriers), memAddressSafe(pImageMemoryBarriers)); } // --- [ vkCmdPipelineBarrier ] --- /** * Unsafe version of: {@link #vkCmdPipelineBarrier CmdPipelineBarrier} * * @param memoryBarrierCount the length of the {@code pMemoryBarriers} array. * @param bufferMemoryBarrierCount the length of the {@code pBufferMemoryBarriers} array. * @param imageMemoryBarrierCount the length of the {@code pImageMemoryBarriers} array. */ public static void nvkCmdPipelineBarrier(VkCommandBuffer commandBuffer, int srcStageMask, int dstStageMask, int dependencyFlags, int memoryBarrierCount, long pMemoryBarriers, int bufferMemoryBarrierCount, long pBufferMemoryBarriers, int imageMemoryBarrierCount, long pImageMemoryBarriers) { long __functionAddress = commandBuffer.getCapabilities().vkCmdPipelineBarrier; callPPPPV(commandBuffer.address(), srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, __functionAddress); } /** * Insert a memory dependency. * *
C Specification
* *

To record a pipeline barrier, call:

* *

     * void vkCmdPipelineBarrier(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineStageFlags                        srcStageMask,
     *     VkPipelineStageFlags                        dstStageMask,
     *     VkDependencyFlags                           dependencyFlags,
     *     uint32_t                                    memoryBarrierCount,
     *     const VkMemoryBarrier*                      pMemoryBarriers,
     *     uint32_t                                    bufferMemoryBarrierCount,
     *     const VkBufferMemoryBarrier*                pBufferMemoryBarriers,
     *     uint32_t                                    imageMemoryBarrierCount,
     *     const VkImageMemoryBarrier*                 pImageMemoryBarriers);
* *
Description
* *

{@code vkCmdPipelineBarrier} operates almost identically to {@link KHRSynchronization2#vkCmdPipelineBarrier2KHR CmdPipelineBarrier2KHR}, except that the scopes and barriers are defined as direct parameters rather than being defined by an {@link VkDependencyInfoKHR}.

* *

When {@link #vkCmdPipelineBarrier CmdPipelineBarrier} is submitted to a queue, it defines a memory dependency between commands that were submitted before it, and those submitted after it.

* *

If {@link #vkCmdPipelineBarrier CmdPipelineBarrier} was recorded outside a render pass instance, the first synchronization scope includes all commands that occur earlier in submission order. If {@link #vkCmdPipelineBarrier CmdPipelineBarrier} was recorded inside a render pass instance, the first synchronization scope includes only commands that occur earlier in submission order within the same subpass. In either case, the first synchronization scope is limited to operations on the pipeline stages determined by the source stage mask specified by {@code srcStageMask}.

* *

If {@link #vkCmdPipelineBarrier CmdPipelineBarrier} was recorded outside a render pass instance, the second synchronization scope includes all commands that occur later in submission order. If {@link #vkCmdPipelineBarrier CmdPipelineBarrier} was recorded inside a render pass instance, the second synchronization scope includes only commands that occur later in submission order within the same subpass. In either case, the second synchronization scope is limited to operations on the pipeline stages determined by the destination stage mask specified by {@code dstStageMask}.

* *

The first access scope is limited to accesses in the pipeline stages determined by the source stage mask specified by {@code srcStageMask}. Within that, the first access scope only includes the first access scopes defined by elements of the {@code pMemoryBarriers}, {@code pBufferMemoryBarriers} and {@code pImageMemoryBarriers} arrays, which each define a set of memory barriers. If no memory barriers are specified, then the first access scope includes no accesses.

* *

The second access scope is limited to accesses in the pipeline stages determined by the destination stage mask specified by {@code dstStageMask}. Within that, the second access scope only includes the second access scopes defined by elements of the {@code pMemoryBarriers}, {@code pBufferMemoryBarriers} and {@code pImageMemoryBarriers} arrays, which each define a set of memory barriers. If no memory barriers are specified, then the second access scope includes no accesses.

* *

If {@code dependencyFlags} includes {@link #VK_DEPENDENCY_BY_REGION_BIT DEPENDENCY_BY_REGION_BIT}, then any dependency between framebuffer-space pipeline stages is framebuffer-local - otherwise it is framebuffer-global.

* *
Valid Usage
* *
    *
  • If the geometry shaders feature is not enabled, {@code srcStageMask} must not contain {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}
  • *
  • If the tessellation shaders feature is not enabled, {@code srcStageMask} must not contain {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT} or {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}
  • *
  • If the conditional rendering feature is not enabled, {@code srcStageMask} must not contain {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT}
  • *
  • If the fragment density map feature is not enabled, {@code srcStageMask} must not contain {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT}
  • *
  • If the transform feedback feature is not enabled, {@code srcStageMask} must not contain {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
  • *
  • If the mesh shaders feature is not enabled, {@code srcStageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}
  • *
  • If the task shaders feature is not enabled, {@code srcStageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}
  • *
  • If the shading rate image feature is not enabled, {@code srcStageMask} must not contain {@link NVShadingRateImage#VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV}
  • *
  • Any pipeline stage included in {@code srcStageMask} must be supported by the capabilities of the queue family specified by the {@code queueFamilyIndex} member of the {@link VkCommandPoolCreateInfo} structure that was used to create the {@code VkCommandPool} that {@code commandBuffer} was allocated from, as specified in the table of supported pipeline stages
  • *
  • If the {@code synchronization2} feature is not enabled, {@code srcStageMask} must not be 0
  • *
* *
    *
  • If the geometry shaders feature is not enabled, {@code dstStageMask} must not contain {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}
  • *
  • If the tessellation shaders feature is not enabled, {@code dstStageMask} must not contain {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT} or {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}
  • *
  • If the conditional rendering feature is not enabled, {@code dstStageMask} must not contain {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT}
  • *
  • If the fragment density map feature is not enabled, {@code dstStageMask} must not contain {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT}
  • *
  • If the transform feedback feature is not enabled, {@code dstStageMask} must not contain {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
  • *
  • If the mesh shaders feature is not enabled, {@code dstStageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV}
  • *
  • If the task shaders feature is not enabled, {@code dstStageMask} must not contain {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}
  • *
  • If the shading rate image feature is not enabled, {@code dstStageMask} must not contain {@link NVShadingRateImage#VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV}
  • *
  • Any pipeline stage included in {@code dstStageMask} must be supported by the capabilities of the queue family specified by the {@code queueFamilyIndex} member of the {@link VkCommandPoolCreateInfo} structure that was used to create the {@code VkCommandPool} that {@code commandBuffer} was allocated from, as specified in the table of supported pipeline stages
  • *
  • If the {@code synchronization2} feature is not enabled, {@code dstStageMask} must not be 0
  • *
* *
    *
  • The {@code srcAccessMask} member of each element of {@code pMemoryBarriers} must only include access flags that are supported by one or more of the pipeline stages in {@code srcStageMask}, as specified in the table of supported access types
  • *
  • The {@code dstAccessMask} member of each element of {@code pMemoryBarriers} must only include access flags that are supported by one or more of the pipeline stages in {@code dstStageMask}, as specified in the table of supported access types
  • *
  • For any element of {@code pBufferMemoryBarriers}, if its {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members are equal, or if its {@code srcQueueFamilyIndex} is the queue family index that was used to create the command pool that {@code commandBuffer} was allocated from, then its {@code srcAccessMask} member must only contain access flags that are supported by one or more of the pipeline stages in {@code srcStageMask}, as specified in the table of supported access types
  • *
  • For any element of {@code pBufferMemoryBarriers}, if its {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members are equal, or if its {@code dstQueueFamilyIndex} is the queue family index that was used to create the command pool that {@code commandBuffer} was allocated from, then its {@code dstAccessMask} member must only contain access flags that are supported by one or more of the pipeline stages in {@code dstStageMask}, as specified in the table of supported access types
  • *
  • For any element of {@code pImageMemoryBarriers}, if its {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members are equal, or if its {@code srcQueueFamilyIndex} is the queue family index that was used to create the command pool that {@code commandBuffer} was allocated from, then its {@code srcAccessMask} member must only contain access flags that are supported by one or more of the pipeline stages in {@code srcStageMask}, as specified in the table of supported access types
  • *
  • For any element of {@code pImageMemoryBarriers}, if its {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members are equal, or if its {@code dstQueueFamilyIndex} is the queue family index that was used to create the command pool that {@code commandBuffer} was allocated from, then its {@code dstAccessMask} member must only contain access flags that are supported by one or more of the pipeline stages in {@code dstStageMask}, as specified in the table of supported access types
  • *
* *
    *
  • If {@code vkCmdPipelineBarrier} is called within a render pass instance, the render pass must have been created with at least one {@link VkSubpassDependency} instance in {@link VkRenderPassCreateInfo}{@code ::pDependencies} that expresses a dependency from the current subpass to itself, with synchronization scopes and access scopes that are all supersets of the scopes defined in this command
  • *
  • If {@code vkCmdPipelineBarrier} is called within a render pass instance, it must not include any buffer memory barriers
  • *
  • If {@code vkCmdPipelineBarrier} is called within a render pass instance, the {@code image} member of any image memory barrier included in this command must be an attachment used in the current subpass both as an input attachment, and as either a color or depth/stencil attachment
  • *
  • If {@code vkCmdPipelineBarrier} is called within a render pass instance, the {@code oldLayout} and {@code newLayout} members of any image memory barrier included in this command must be equal
  • *
  • If {@code vkCmdPipelineBarrier} is called within a render pass instance, the {@code srcQueueFamilyIndex} and {@code dstQueueFamilyIndex} members of any image memory barrier included in this command must be equal
  • *
  • If {@code vkCmdPipelineBarrier} is called outside of a render pass instance, {@link VK11#VK_DEPENDENCY_VIEW_LOCAL_BIT DEPENDENCY_VIEW_LOCAL_BIT} must not be included in the dependency flags
  • *
  • If {@code vkCmdPipelineBarrier} is called within a render pass instance, the render pass must not have been started with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code srcStageMask} must be a valid combination of {@code VkPipelineStageFlagBits} values
  • *
  • {@code dstStageMask} must be a valid combination of {@code VkPipelineStageFlagBits} values
  • *
  • {@code dependencyFlags} must be a valid combination of {@code VkDependencyFlagBits} values
  • *
  • If {@code memoryBarrierCount} is not 0, {@code pMemoryBarriers} must be a valid pointer to an array of {@code memoryBarrierCount} valid {@link VkMemoryBarrier} structures
  • *
  • If {@code bufferMemoryBarrierCount} is not 0, {@code pBufferMemoryBarriers} must be a valid pointer to an array of {@code bufferMemoryBarrierCount} valid {@link VkBufferMemoryBarrier} structures
  • *
  • If {@code imageMemoryBarrierCount} is not 0, {@code pImageMemoryBarriers} must be a valid pointer to an array of {@code imageMemoryBarrierCount} valid {@link VkImageMemoryBarrier} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothTransfer Graphics Compute
* *
See Also
* *

{@link VkBufferMemoryBarrier}, {@link VkImageMemoryBarrier}, {@link VkMemoryBarrier}

* * @param commandBuffer the command buffer into which the command is recorded. * @param srcStageMask a bitmask of {@code VkPipelineStageFlagBits} specifying the source stages. * @param dstStageMask a bitmask of {@code VkPipelineStageFlagBits} specifying the destination stages. * @param dependencyFlags a bitmask of {@code VkDependencyFlagBits} specifying how execution and memory dependencies are formed. * @param pMemoryBarriers a pointer to an array of {@link VkMemoryBarrier} structures. * @param pBufferMemoryBarriers a pointer to an array of {@link VkBufferMemoryBarrier} structures. * @param pImageMemoryBarriers a pointer to an array of {@link VkImageMemoryBarrier} structures. */ public static void vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, @NativeType("VkPipelineStageFlags") int srcStageMask, @NativeType("VkPipelineStageFlags") int dstStageMask, @NativeType("VkDependencyFlags") int dependencyFlags, @Nullable @NativeType("VkMemoryBarrier const *") VkMemoryBarrier.Buffer pMemoryBarriers, @Nullable @NativeType("VkBufferMemoryBarrier const *") VkBufferMemoryBarrier.Buffer pBufferMemoryBarriers, @Nullable @NativeType("VkImageMemoryBarrier const *") VkImageMemoryBarrier.Buffer pImageMemoryBarriers) { nvkCmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, remainingSafe(pMemoryBarriers), memAddressSafe(pMemoryBarriers), remainingSafe(pBufferMemoryBarriers), memAddressSafe(pBufferMemoryBarriers), remainingSafe(pImageMemoryBarriers), memAddressSafe(pImageMemoryBarriers)); } // --- [ vkCmdBeginQuery ] --- /** * Begin a query. * *
C Specification
* *

To begin a query, call:

* *

     * void vkCmdBeginQuery(
     *     VkCommandBuffer                             commandBuffer,
     *     VkQueryPool                                 queryPool,
     *     uint32_t                                    query,
     *     VkQueryControlFlags                         flags);
* *
Description
* *

If the {@code queryType} of the pool is {@link #VK_QUERY_TYPE_OCCLUSION QUERY_TYPE_OCCLUSION} and {@code flags} contains {@link #VK_QUERY_CONTROL_PRECISE_BIT QUERY_CONTROL_PRECISE_BIT}, an implementation must return a result that matches the actual number of samples passed. This is described in more detail in Occlusion Queries.

* *

Calling {@code vkCmdBeginQuery} is equivalent to calling {@link EXTTransformFeedback#vkCmdBeginQueryIndexedEXT CmdBeginQueryIndexedEXT} with the {@code index} parameter set to zero.

* *

After beginning a query, that query is considered active within the command buffer it was called in until that same query is ended. Queries active in a primary command buffer when secondary command buffers are executed are considered active for those secondary command buffers.

* *
Valid Usage
* *
    *
  • All queries used by the command must be unavailable
  • *
  • The {@code queryType} used to create {@code queryPool} must not be {@link #VK_QUERY_TYPE_TIMESTAMP QUERY_TYPE_TIMESTAMP}
  • *
  • The {@code queryType} used to create {@code queryPool} must not be {@link KHRAccelerationStructure#VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR} or {@link KHRAccelerationStructure#VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR}
  • *
  • The {@code queryType} used to create {@code queryPool} must not be {@link NVRayTracing#VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV}
  • *
  • If the precise occlusion queries feature is not enabled, or the {@code queryType} used to create {@code queryPool} was not {@link #VK_QUERY_TYPE_OCCLUSION QUERY_TYPE_OCCLUSION}, {@code flags} must not contain {@link #VK_QUERY_CONTROL_PRECISE_BIT QUERY_CONTROL_PRECISE_BIT}
  • *
  • {@code query} must be less than the number of queries in {@code queryPool}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link #VK_QUERY_TYPE_OCCLUSION QUERY_TYPE_OCCLUSION}, the {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link #VK_QUERY_TYPE_PIPELINE_STATISTICS QUERY_TYPE_PIPELINE_STATISTICS} and any of the {@code pipelineStatistics} indicate graphics operations, the {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link #VK_QUERY_TYPE_PIPELINE_STATISTICS QUERY_TYPE_PIPELINE_STATISTICS} and any of the {@code pipelineStatistics} indicate compute operations, the {@code VkCommandPool} that {@code commandBuffer} was allocated from must support compute operations
  • *
  • {@code commandBuffer} must not be a protected command buffer
  • *
  • If called within a render pass instance, the sum of {@code query} and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in {@code queryPool}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRVideoEncodeQueue#VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR} the {@code VkCommandPool} that {@code commandBuffer} was allocated from must support video encode operations
  • *
  • {@code queryPool} must have been created with a {@code queryType} that differs from that of any queries that are active within {@code commandBuffer}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link EXTTransformFeedback#VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT} the {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link EXTTransformFeedback#VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT} then {@link VkPhysicalDeviceTransformFeedbackPropertiesEXT}{@code ::transformFeedbackQueries} must be supported
  • *
* *
    *
  • If {@code queryPool} was created with a {@code queryType} of {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, the profiling lock must have been held before {@link #vkBeginCommandBuffer BeginCommandBuffer} was called on {@code commandBuffer}
  • *
  • If {@code queryPool} was created with a {@code queryType} of {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR} and one of the counters used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR}, the query begin must be the first recorded command in {@code commandBuffer}
  • *
  • If {@code queryPool} was created with a {@code queryType} of {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR} and one of the counters used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR}, the begin command must not be recorded within a render pass instance
  • *
  • If {@code queryPool} was created with a {@code queryType} of {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR} and another query pool with a {@code queryType} {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR} has been used within {@code commandBuffer}, its parent primary command buffer or secondary command buffer recorded within the same parent primary command buffer as {@code commandBuffer}, the {@code performanceCounterMultipleQueryPools} feature must be enabled
  • *
  • If {@code queryPool} was created with a {@code queryType} of {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, this command must not be recorded in a command buffer that, either directly or through secondary command buffers, also contains a {@code vkCmdResetQueryPool} command affecting the same query
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code queryPool} must be a valid {@code VkQueryPool} handle
  • *
  • {@code flags} must be a valid combination of {@code VkQueryControlFlagBits} values
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • Both of {@code commandBuffer}, and {@code queryPool} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer into which this command will be recorded. * @param queryPool the query pool that will manage the results of the query. * @param query the query index within the query pool that will contain the results. * @param flags a bitmask of {@code VkQueryControlFlagBits} specifying constraints on the types of queries that can be performed. */ public static void vkCmdBeginQuery(VkCommandBuffer commandBuffer, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int query, @NativeType("VkQueryControlFlags") int flags) { long __functionAddress = commandBuffer.getCapabilities().vkCmdBeginQuery; callPJV(commandBuffer.address(), queryPool, query, flags, __functionAddress); } // --- [ vkCmdEndQuery ] --- /** * Ends a query. * *
C Specification
* *

To end a query after the set of desired drawing or dispatching commands is executed, call:

* *

     * void vkCmdEndQuery(
     *     VkCommandBuffer                             commandBuffer,
     *     VkQueryPool                                 queryPool,
     *     uint32_t                                    query);
* *
Description
* *

Calling {@code vkCmdEndQuery} is equivalent to calling {@link EXTTransformFeedback#vkCmdEndQueryIndexedEXT CmdEndQueryIndexedEXT} with the {@code index} parameter set to zero.

* *

As queries operate asynchronously, ending a query does not immediately set the query’s status to available. A query is considered finished when the final results of the query are ready to be retrieved by {@link #vkGetQueryPoolResults GetQueryPoolResults} and {@link #vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults}, and this is when the query’s status is set to available.

* *

Once a query is ended the query must finish in finite time, unless the state of the query is changed using other commands, e.g. by issuing a reset of the query.

* *
Valid Usage
* *
    *
  • All queries used by the command must be active
  • *
  • {@code query} must be less than the number of queries in {@code queryPool}
  • *
  • {@code commandBuffer} must not be a protected command buffer
  • *
  • If {@code vkCmdEndQuery} is called within a render pass instance, the sum of {@code query} and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in {@code queryPool}
  • *
  • If {@code queryPool} was created with a {@code queryType} of {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR} and one or more of the counters used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR}, the {@link #vkCmdEndQuery CmdEndQuery} must be the last recorded command in {@code commandBuffer}
  • *
  • If {@code queryPool} was created with a {@code queryType} of {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR} and one or more of the counters used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR}, the {@link #vkCmdEndQuery CmdEndQuery} must not be recorded within a render pass instance
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code queryPool} must be a valid {@code VkQueryPool} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • Both of {@code commandBuffer}, and {@code queryPool} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer into which this command will be recorded. * @param queryPool the query pool that is managing the results of the query. * @param query the query index within the query pool where the result is stored. */ public static void vkCmdEndQuery(VkCommandBuffer commandBuffer, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int query) { long __functionAddress = commandBuffer.getCapabilities().vkCmdEndQuery; callPJV(commandBuffer.address(), queryPool, query, __functionAddress); } // --- [ vkCmdResetQueryPool ] --- /** * Reset queries in a query pool. * *
C Specification
* *

To reset a range of queries in a query pool on a queue, call:

* *

     * void vkCmdResetQueryPool(
     *     VkCommandBuffer                             commandBuffer,
     *     VkQueryPool                                 queryPool,
     *     uint32_t                                    firstQuery,
     *     uint32_t                                    queryCount);
* *
Description
* *

When executed on a queue, this command sets the status of query indices [firstQuery, firstQuery + queryCount - 1] to unavailable.

* *

If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, this command sets the status of query indices [firstQuery, firstQuery + queryCount - 1] to unavailable for each pass of {@code queryPool}, as indicated by a call to {@link KHRPerformanceQuery#vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR}.

* *
Note
* *

Because {@code vkCmdResetQueryPool} resets all the passes of the indicated queries, applications must not record a {@code vkCmdResetQueryPool} command for a {@code queryPool} created with {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR} in a command buffer that needs to be submitted multiple times as indicated by a call to {@link KHRPerformanceQuery#vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR}. Otherwise applications will never be able to complete the recorded queries.

*
* *
Valid Usage
* *
    *
  • {@code firstQuery} must be less than the number of queries in {@code queryPool}
  • *
  • The sum of {@code firstQuery} and {@code queryCount} must be less than or equal to the number of queries in {@code queryPool}
  • *
  • All queries used by the command must not be active
  • *
  • If {@code queryPool} was created with {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, this command must not be recorded in a command buffer that, either directly or through secondary command buffers, also contains begin commands for a query from the set of queries [firstQuery, firstQuery + queryCount - 1]
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code queryPool} must be a valid {@code VkQueryPool} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • Both of {@code commandBuffer}, and {@code queryPool} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics Compute
* * @param commandBuffer the command buffer into which this command will be recorded. * @param queryPool the handle of the query pool managing the queries being reset. * @param firstQuery the initial query index to reset. * @param queryCount the number of queries to reset. */ public static void vkCmdResetQueryPool(VkCommandBuffer commandBuffer, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int firstQuery, @NativeType("uint32_t") int queryCount) { long __functionAddress = commandBuffer.getCapabilities().vkCmdResetQueryPool; callPJV(commandBuffer.address(), queryPool, firstQuery, queryCount, __functionAddress); } // --- [ vkCmdWriteTimestamp ] --- /** * Write a device timestamp into a query object. * *
C Specification
* *

To request a timestamp, call:

* *

     * void vkCmdWriteTimestamp(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineStageFlagBits                     pipelineStage,
     *     VkQueryPool                                 queryPool,
     *     uint32_t                                    query);
* *
Description
* *

{@code vkCmdWriteTimestamp} latches the value of the timer when all previous commands have completed executing as far as the specified pipeline stage, and writes the timestamp value to memory. When the timestamp value is written, the availability status of the query is set to available.

* *
Note
* *

If an implementation is unable to detect completion and latch the timer at any specific stage of the pipeline, it may instead do so at any logically later stage.

*
* *

Comparisons between timestamps are not meaningful if the timestamps are written by commands submitted to different queues.

* *
Note
* *

An example of such a comparison is subtracting an older timestamp from a newer one to determine the execution time of a sequence of commands.

*
* *

If {@code vkCmdWriteTimestamp} is called while executing a render pass instance that has multiview enabled, the timestamp uses N consecutive query indices in the query pool (starting at {@code query}) where N is the number of bits set in the view mask of the subpass the command is executed in. The resulting query values are determined by an implementation-dependent choice of one of the following behaviors:

* *
    *
  • The first query is a timestamp value and (if more than one bit is set in the view mask) zero is written to the remaining queries. If two timestamps are written in the same subpass, the sum of the execution time of all views between those commands is the difference between the first query written by each command.
  • *
  • All N queries are timestamp values. If two timestamps are written in the same subpass, the sum of the execution time of all views between those commands is the sum of the difference between corresponding queries written by each command. The difference between corresponding queries may be the execution time of a single view.
  • *
* *

In either case, the application can sum the differences between all N queries to determine the total execution time.

* *
Valid Usage
* *
    *
  • {@code pipelineStage} must be a valid stage for the queue family that was used to create the command pool that {@code commandBuffer} was allocated from
  • *
  • If the geometry shaders feature is not enabled, {@code pipelineStage} must not be {@link #VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT PIPELINE_STAGE_GEOMETRY_SHADER_BIT}
  • *
  • If the tessellation shaders feature is not enabled, {@code pipelineStage} must not be {@link #VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT} or {@link #VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT}
  • *
  • If the conditional rendering feature is not enabled, {@code pipelineStage} must not be {@link EXTConditionalRendering#VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT}
  • *
  • If the fragment density map feature is not enabled, {@code pipelineStage} must not be {@link EXTFragmentDensityMap#VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT}
  • *
  • If the transform feedback feature is not enabled, {@code pipelineStage} must not be {@link EXTTransformFeedback#VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT}
  • *
  • If the mesh shaders feature is not enabled, {@code pipelineStage} must not be {@link NVMeshShader#VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV PIPELINE_STAGE_MESH_SHADER_BIT_NV} or {@link NVMeshShader#VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV PIPELINE_STAGE_TASK_SHADER_BIT_NV}
  • *
  • If the shading rate image feature is not enabled, {@code pipelineStage} must not be {@link NVShadingRateImage#VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV}
  • *
  • {@code queryPool} must have been created with a {@code queryType} of {@link #VK_QUERY_TYPE_TIMESTAMP QUERY_TYPE_TIMESTAMP}
  • *
  • The query identified by {@code queryPool} and {@code query} must be unavailable
  • *
  • The command pool’s queue family must support a non-zero {@code timestampValidBits}
  • *
  • {@code query} must be less than the number of queries in {@code queryPool}
  • *
  • All queries used by the command must be unavailable
  • *
  • If {@code vkCmdWriteTimestamp} is called within a render pass instance, the sum of {@code query} and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in {@code queryPool}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pipelineStage} must be a valid {@code VkPipelineStageFlagBits} value
  • *
  • {@code queryPool} must be a valid {@code VkQueryPool} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • Both of {@code commandBuffer}, and {@code queryPool} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothTransfer Graphics Compute
* * @param commandBuffer the command buffer into which the command will be recorded. * @param pipelineStage a {@code VkPipelineStageFlagBits} value, specifying a stage of the pipeline. * @param queryPool the query pool that will manage the timestamp. * @param query the query within the query pool that will contain the timestamp. */ public static void vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, @NativeType("VkPipelineStageFlagBits") int pipelineStage, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int query) { long __functionAddress = commandBuffer.getCapabilities().vkCmdWriteTimestamp; callPJV(commandBuffer.address(), pipelineStage, queryPool, query, __functionAddress); } // --- [ vkCmdCopyQueryPoolResults ] --- /** * Copy the results of queries in a query pool to a buffer object. * *
C Specification
* *

To copy query statuses and numerical results directly to buffer memory, call:

* *

     * void vkCmdCopyQueryPoolResults(
     *     VkCommandBuffer                             commandBuffer,
     *     VkQueryPool                                 queryPool,
     *     uint32_t                                    firstQuery,
     *     uint32_t                                    queryCount,
     *     VkBuffer                                    dstBuffer,
     *     VkDeviceSize                                dstOffset,
     *     VkDeviceSize                                stride,
     *     VkQueryResultFlags                          flags);
* *
Description
* *

{@code vkCmdCopyQueryPoolResults} is guaranteed to see the effect of previous uses of {@code vkCmdResetQueryPool} in the same queue, without any additional synchronization. Thus, the results will always reflect the most recent use of the query.

* *

{@code flags} has the same possible values described above for the {@code flags} parameter of {@link #vkGetQueryPoolResults GetQueryPoolResults}, but the different style of execution causes some subtle behavioral differences. Because {@code vkCmdCopyQueryPoolResults} executes in order with respect to other query commands, there is less ambiguity about which use of a query is being requested.

* *

Results for all requested occlusion queries, pipeline statistics queries, transform feedback queries, and timestamp queries are written as 64-bit unsigned integer values if {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is set or 32-bit unsigned integer values otherwise. Performance queries store results in a tightly packed array whose type is determined by the {@code unit} member of the corresponding {@link VkPerformanceCounterKHR}.

* *

If neither of {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} and {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} are set, results are only written out for queries in the available state.

* *

If {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is set, the implementation will wait for each query’s status to be in the available state before retrieving the numerical results for that query. This is guaranteed to reflect the most recent use of the query on the same queue, assuming that the query is not being simultaneously used by other queues. If the query does not become available in a finite amount of time (e.g. due to not issuing a query since the last reset), a {@link #VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST} error may occur.

* *

Similarly, if {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT} is set and {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is not set, the availability is guaranteed to reflect the most recent use of the query on the same queue, assuming that the query is not being simultaneously used by other queues. As with {@code vkGetQueryPoolResults}, implementations must guarantee that if they return a non-zero availability value, then the numerical results are valid.

* *

If {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} is set, {@link #VK_QUERY_RESULT_WAIT_BIT QUERY_RESULT_WAIT_BIT} is not set, and the query’s status is unavailable, an intermediate result value between zero and the final result value is written for that query.

* *

{@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} must not be used if the pool’s {@code queryType} is {@link #VK_QUERY_TYPE_TIMESTAMP QUERY_TYPE_TIMESTAMP}.

* *

{@code vkCmdCopyQueryPoolResults} is considered to be a transfer operation, and its writes to buffer memory must be synchronized using {@link #VK_PIPELINE_STAGE_TRANSFER_BIT PIPELINE_STAGE_TRANSFER_BIT} and {@link #VK_ACCESS_TRANSFER_WRITE_BIT ACCESS_TRANSFER_WRITE_BIT} before using the results.

* *
Valid Usage
* *
    *
  • {@code dstOffset} must be less than the size of {@code dstBuffer}
  • *
  • {@code firstQuery} must be less than the number of queries in {@code queryPool}
  • *
  • The sum of {@code firstQuery} and {@code queryCount} must be less than or equal to the number of queries in {@code queryPool}
  • *
  • If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is not set in {@code flags} then {@code dstOffset} and {@code stride} must be multiples of 4
  • *
  • If {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT} is set in {@code flags} then {@code dstOffset} and {@code stride} must be multiples of 8
  • *
  • {@code dstBuffer} must have enough storage, from {@code dstOffset}, to contain the result of each query, as described here
  • *
  • {@code dstBuffer} must have been created with {@link #VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link #VK_QUERY_TYPE_TIMESTAMP QUERY_TYPE_TIMESTAMP}, {@code flags} must not contain {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, {@link VkPhysicalDevicePerformanceQueryPropertiesKHR}{@code ::allowCommandBufferQueryCopies} must be {@link #VK_TRUE TRUE}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, {@code flags} must not contain {@link #VK_QUERY_RESULT_WITH_AVAILABILITY_BIT QUERY_RESULT_WITH_AVAILABILITY_BIT}, {@link #VK_QUERY_RESULT_PARTIAL_BIT QUERY_RESULT_PARTIAL_BIT} or {@link #VK_QUERY_RESULT_64_BIT QUERY_RESULT_64_BIT}
  • *
  • If the {@code queryType} used to create {@code queryPool} was {@link KHRPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR QUERY_TYPE_PERFORMANCE_QUERY_KHR}, the {@code queryPool} must have been submitted once for each pass as retrieved via a call to {@link KHRPerformanceQuery#vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR}
  • *
  • {@link #vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults} must not be called if the {@code queryType} used to create {@code queryPool} was {@link INTELPerformanceQuery#VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL QUERY_TYPE_PERFORMANCE_QUERY_INTEL}
  • *
  • {@link #vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults} must not be called if the {@code queryType} used to create {@code queryPool} was {@link KHRVideoEncodeQueue#VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR} or {@link KHRVideoQueue#VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR QUERY_TYPE_RESULT_STATUS_ONLY_KHR}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code queryPool} must be a valid {@code VkQueryPool} handle
  • *
  • {@code dstBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code flags} must be a valid combination of {@code VkQueryResultFlagBits} values
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • Each of {@code commandBuffer}, {@code dstBuffer}, and {@code queryPool} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryOutsideGraphics Compute
* * @param commandBuffer the command buffer into which this command will be recorded. * @param queryPool the query pool managing the queries containing the desired results. * @param firstQuery the initial query index. * @param queryCount the number of queries. {@code firstQuery} and {@code queryCount} together define a range of queries. * @param dstBuffer a {@code VkBuffer} object that will receive the results of the copy command. * @param dstOffset an offset into {@code dstBuffer}. * @param stride the stride in bytes between results for individual queries within {@code dstBuffer}. The required size of the backing memory for {@code dstBuffer} is determined as described above for {@link #vkGetQueryPoolResults GetQueryPoolResults}. * @param flags a bitmask of {@code VkQueryResultFlagBits} specifying how and when results are returned. */ public static void vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int firstQuery, @NativeType("uint32_t") int queryCount, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("VkDeviceSize") long stride, @NativeType("VkQueryResultFlags") int flags) { long __functionAddress = commandBuffer.getCapabilities().vkCmdCopyQueryPoolResults; callPJJJJV(commandBuffer.address(), queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags, __functionAddress); } // --- [ vkCmdPushConstants ] --- /** * Unsafe version of: {@link #vkCmdPushConstants CmdPushConstants} * * @param size the size of the push constant range to update, in units of bytes. */ public static void nvkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, int size, long pValues) { long __functionAddress = commandBuffer.getCapabilities().vkCmdPushConstants; callPJPV(commandBuffer.address(), layout, stageFlags, offset, size, pValues, __functionAddress); } /** * Update the values of push constants. * *
C Specification
* *

To update push constants, call:

* *

     * void vkCmdPushConstants(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineLayout                            layout,
     *     VkShaderStageFlags                          stageFlags,
     *     uint32_t                                    offset,
     *     uint32_t                                    size,
     *     const void*                                 pValues);
* *
Description
* *

When a command buffer begins recording, all push constant values are undefined. Reads of undefined push constant values by the executing shader return undefined values.

* *

Push constant values can be updated incrementally, causing shader stages in {@code stageFlags} to read the new data from {@code pValues} for push constants modified by this command, while still reading the previous data for push constants not modified by this command. When a bound pipeline command is issued, the bound pipeline’s layout must be compatible with the layouts used to set the values of all push constants in the pipeline layout’s push constant ranges, as described in Pipeline Layout Compatibility. Binding a pipeline with a layout that is not compatible with the push constant layout does not disturb the push constant values.

* *
Note
* *

As {@code stageFlags} needs to include all flags the relevant push constant ranges were created with, any flags that are not supported by the queue family that the {@code VkCommandPool} used to allocate {@code commandBuffer} was created on are ignored.

*
* *
Valid Usage
* *
    *
  • For each byte in the range specified by {@code offset} and {@code size} and for each shader stage in {@code stageFlags}, there must be a push constant range in {@code layout} that includes that byte and that stage
  • *
  • For each byte in the range specified by {@code offset} and {@code size} and for each push constant range that overlaps that byte, {@code stageFlags} must include all stages in that push constant range’s {@link VkPushConstantRange}{@code ::stageFlags}
  • *
  • {@code offset} must be a multiple of 4
  • *
  • {@code size} must be a multiple of 4
  • *
  • {@code offset} must be less than {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize}
  • *
  • {@code size} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize} minus {@code offset}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code layout} must be a valid {@code VkPipelineLayout} handle
  • *
  • {@code stageFlags} must be a valid combination of {@code VkShaderStageFlagBits} values
  • *
  • {@code stageFlags} must not be 0
  • *
  • {@code pValues} must be a valid pointer to an array of {@code size} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • {@code size} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code layout} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer in which the push constant update will be recorded. * @param layout the pipeline layout used to program the push constant updates. * @param stageFlags a bitmask of {@code VkShaderStageFlagBits} specifying the shader stages that will use the push constants in the updated range. * @param offset the start offset of the push constant range to update, in units of bytes. * @param pValues a pointer to an array of {@code size} bytes containing the new push constant values. */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") ByteBuffer pValues) { nvkCmdPushConstants(commandBuffer, layout, stageFlags, offset, pValues.remaining(), memAddress(pValues)); } /** * Update the values of push constants. * *
C Specification
* *

To update push constants, call:

* *

     * void vkCmdPushConstants(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineLayout                            layout,
     *     VkShaderStageFlags                          stageFlags,
     *     uint32_t                                    offset,
     *     uint32_t                                    size,
     *     const void*                                 pValues);
* *
Description
* *

When a command buffer begins recording, all push constant values are undefined. Reads of undefined push constant values by the executing shader return undefined values.

* *

Push constant values can be updated incrementally, causing shader stages in {@code stageFlags} to read the new data from {@code pValues} for push constants modified by this command, while still reading the previous data for push constants not modified by this command. When a bound pipeline command is issued, the bound pipeline’s layout must be compatible with the layouts used to set the values of all push constants in the pipeline layout’s push constant ranges, as described in Pipeline Layout Compatibility. Binding a pipeline with a layout that is not compatible with the push constant layout does not disturb the push constant values.

* *
Note
* *

As {@code stageFlags} needs to include all flags the relevant push constant ranges were created with, any flags that are not supported by the queue family that the {@code VkCommandPool} used to allocate {@code commandBuffer} was created on are ignored.

*
* *
Valid Usage
* *
    *
  • For each byte in the range specified by {@code offset} and {@code size} and for each shader stage in {@code stageFlags}, there must be a push constant range in {@code layout} that includes that byte and that stage
  • *
  • For each byte in the range specified by {@code offset} and {@code size} and for each push constant range that overlaps that byte, {@code stageFlags} must include all stages in that push constant range’s {@link VkPushConstantRange}{@code ::stageFlags}
  • *
  • {@code offset} must be a multiple of 4
  • *
  • {@code size} must be a multiple of 4
  • *
  • {@code offset} must be less than {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize}
  • *
  • {@code size} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize} minus {@code offset}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code layout} must be a valid {@code VkPipelineLayout} handle
  • *
  • {@code stageFlags} must be a valid combination of {@code VkShaderStageFlagBits} values
  • *
  • {@code stageFlags} must not be 0
  • *
  • {@code pValues} must be a valid pointer to an array of {@code size} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • {@code size} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code layout} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer in which the push constant update will be recorded. * @param layout the pipeline layout used to program the push constant updates. * @param stageFlags a bitmask of {@code VkShaderStageFlagBits} specifying the shader stages that will use the push constants in the updated range. * @param offset the start offset of the push constant range to update, in units of bytes. * @param pValues a pointer to an array of {@code size} bytes containing the new push constant values. */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") ShortBuffer pValues) { nvkCmdPushConstants(commandBuffer, layout, stageFlags, offset, pValues.remaining() << 1, memAddress(pValues)); } /** * Update the values of push constants. * *
C Specification
* *

To update push constants, call:

* *

     * void vkCmdPushConstants(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineLayout                            layout,
     *     VkShaderStageFlags                          stageFlags,
     *     uint32_t                                    offset,
     *     uint32_t                                    size,
     *     const void*                                 pValues);
* *
Description
* *

When a command buffer begins recording, all push constant values are undefined. Reads of undefined push constant values by the executing shader return undefined values.

* *

Push constant values can be updated incrementally, causing shader stages in {@code stageFlags} to read the new data from {@code pValues} for push constants modified by this command, while still reading the previous data for push constants not modified by this command. When a bound pipeline command is issued, the bound pipeline’s layout must be compatible with the layouts used to set the values of all push constants in the pipeline layout’s push constant ranges, as described in Pipeline Layout Compatibility. Binding a pipeline with a layout that is not compatible with the push constant layout does not disturb the push constant values.

* *
Note
* *

As {@code stageFlags} needs to include all flags the relevant push constant ranges were created with, any flags that are not supported by the queue family that the {@code VkCommandPool} used to allocate {@code commandBuffer} was created on are ignored.

*
* *
Valid Usage
* *
    *
  • For each byte in the range specified by {@code offset} and {@code size} and for each shader stage in {@code stageFlags}, there must be a push constant range in {@code layout} that includes that byte and that stage
  • *
  • For each byte in the range specified by {@code offset} and {@code size} and for each push constant range that overlaps that byte, {@code stageFlags} must include all stages in that push constant range’s {@link VkPushConstantRange}{@code ::stageFlags}
  • *
  • {@code offset} must be a multiple of 4
  • *
  • {@code size} must be a multiple of 4
  • *
  • {@code offset} must be less than {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize}
  • *
  • {@code size} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize} minus {@code offset}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code layout} must be a valid {@code VkPipelineLayout} handle
  • *
  • {@code stageFlags} must be a valid combination of {@code VkShaderStageFlagBits} values
  • *
  • {@code stageFlags} must not be 0
  • *
  • {@code pValues} must be a valid pointer to an array of {@code size} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • {@code size} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code layout} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer in which the push constant update will be recorded. * @param layout the pipeline layout used to program the push constant updates. * @param stageFlags a bitmask of {@code VkShaderStageFlagBits} specifying the shader stages that will use the push constants in the updated range. * @param offset the start offset of the push constant range to update, in units of bytes. * @param pValues a pointer to an array of {@code size} bytes containing the new push constant values. */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") IntBuffer pValues) { nvkCmdPushConstants(commandBuffer, layout, stageFlags, offset, pValues.remaining() << 2, memAddress(pValues)); } /** * Update the values of push constants. * *
C Specification
* *

To update push constants, call:

* *

     * void vkCmdPushConstants(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineLayout                            layout,
     *     VkShaderStageFlags                          stageFlags,
     *     uint32_t                                    offset,
     *     uint32_t                                    size,
     *     const void*                                 pValues);
* *
Description
* *

When a command buffer begins recording, all push constant values are undefined. Reads of undefined push constant values by the executing shader return undefined values.

* *

Push constant values can be updated incrementally, causing shader stages in {@code stageFlags} to read the new data from {@code pValues} for push constants modified by this command, while still reading the previous data for push constants not modified by this command. When a bound pipeline command is issued, the bound pipeline’s layout must be compatible with the layouts used to set the values of all push constants in the pipeline layout’s push constant ranges, as described in Pipeline Layout Compatibility. Binding a pipeline with a layout that is not compatible with the push constant layout does not disturb the push constant values.

* *
Note
* *

As {@code stageFlags} needs to include all flags the relevant push constant ranges were created with, any flags that are not supported by the queue family that the {@code VkCommandPool} used to allocate {@code commandBuffer} was created on are ignored.

*
* *
Valid Usage
* *
    *
  • For each byte in the range specified by {@code offset} and {@code size} and for each shader stage in {@code stageFlags}, there must be a push constant range in {@code layout} that includes that byte and that stage
  • *
  • For each byte in the range specified by {@code offset} and {@code size} and for each push constant range that overlaps that byte, {@code stageFlags} must include all stages in that push constant range’s {@link VkPushConstantRange}{@code ::stageFlags}
  • *
  • {@code offset} must be a multiple of 4
  • *
  • {@code size} must be a multiple of 4
  • *
  • {@code offset} must be less than {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize}
  • *
  • {@code size} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize} minus {@code offset}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code layout} must be a valid {@code VkPipelineLayout} handle
  • *
  • {@code stageFlags} must be a valid combination of {@code VkShaderStageFlagBits} values
  • *
  • {@code stageFlags} must not be 0
  • *
  • {@code pValues} must be a valid pointer to an array of {@code size} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • {@code size} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code layout} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer in which the push constant update will be recorded. * @param layout the pipeline layout used to program the push constant updates. * @param stageFlags a bitmask of {@code VkShaderStageFlagBits} specifying the shader stages that will use the push constants in the updated range. * @param offset the start offset of the push constant range to update, in units of bytes. * @param pValues a pointer to an array of {@code size} bytes containing the new push constant values. */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") LongBuffer pValues) { nvkCmdPushConstants(commandBuffer, layout, stageFlags, offset, pValues.remaining() << 3, memAddress(pValues)); } /** * Update the values of push constants. * *
C Specification
* *

To update push constants, call:

* *

     * void vkCmdPushConstants(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineLayout                            layout,
     *     VkShaderStageFlags                          stageFlags,
     *     uint32_t                                    offset,
     *     uint32_t                                    size,
     *     const void*                                 pValues);
* *
Description
* *

When a command buffer begins recording, all push constant values are undefined. Reads of undefined push constant values by the executing shader return undefined values.

* *

Push constant values can be updated incrementally, causing shader stages in {@code stageFlags} to read the new data from {@code pValues} for push constants modified by this command, while still reading the previous data for push constants not modified by this command. When a bound pipeline command is issued, the bound pipeline’s layout must be compatible with the layouts used to set the values of all push constants in the pipeline layout’s push constant ranges, as described in Pipeline Layout Compatibility. Binding a pipeline with a layout that is not compatible with the push constant layout does not disturb the push constant values.

* *
Note
* *

As {@code stageFlags} needs to include all flags the relevant push constant ranges were created with, any flags that are not supported by the queue family that the {@code VkCommandPool} used to allocate {@code commandBuffer} was created on are ignored.

*
* *
Valid Usage
* *
    *
  • For each byte in the range specified by {@code offset} and {@code size} and for each shader stage in {@code stageFlags}, there must be a push constant range in {@code layout} that includes that byte and that stage
  • *
  • For each byte in the range specified by {@code offset} and {@code size} and for each push constant range that overlaps that byte, {@code stageFlags} must include all stages in that push constant range’s {@link VkPushConstantRange}{@code ::stageFlags}
  • *
  • {@code offset} must be a multiple of 4
  • *
  • {@code size} must be a multiple of 4
  • *
  • {@code offset} must be less than {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize}
  • *
  • {@code size} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize} minus {@code offset}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code layout} must be a valid {@code VkPipelineLayout} handle
  • *
  • {@code stageFlags} must be a valid combination of {@code VkShaderStageFlagBits} values
  • *
  • {@code stageFlags} must not be 0
  • *
  • {@code pValues} must be a valid pointer to an array of {@code size} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • {@code size} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code layout} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer in which the push constant update will be recorded. * @param layout the pipeline layout used to program the push constant updates. * @param stageFlags a bitmask of {@code VkShaderStageFlagBits} specifying the shader stages that will use the push constants in the updated range. * @param offset the start offset of the push constant range to update, in units of bytes. * @param pValues a pointer to an array of {@code size} bytes containing the new push constant values. */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") FloatBuffer pValues) { nvkCmdPushConstants(commandBuffer, layout, stageFlags, offset, pValues.remaining() << 2, memAddress(pValues)); } /** * Update the values of push constants. * *
C Specification
* *

To update push constants, call:

* *

     * void vkCmdPushConstants(
     *     VkCommandBuffer                             commandBuffer,
     *     VkPipelineLayout                            layout,
     *     VkShaderStageFlags                          stageFlags,
     *     uint32_t                                    offset,
     *     uint32_t                                    size,
     *     const void*                                 pValues);
* *
Description
* *

When a command buffer begins recording, all push constant values are undefined. Reads of undefined push constant values by the executing shader return undefined values.

* *

Push constant values can be updated incrementally, causing shader stages in {@code stageFlags} to read the new data from {@code pValues} for push constants modified by this command, while still reading the previous data for push constants not modified by this command. When a bound pipeline command is issued, the bound pipeline’s layout must be compatible with the layouts used to set the values of all push constants in the pipeline layout’s push constant ranges, as described in Pipeline Layout Compatibility. Binding a pipeline with a layout that is not compatible with the push constant layout does not disturb the push constant values.

* *
Note
* *

As {@code stageFlags} needs to include all flags the relevant push constant ranges were created with, any flags that are not supported by the queue family that the {@code VkCommandPool} used to allocate {@code commandBuffer} was created on are ignored.

*
* *
Valid Usage
* *
    *
  • For each byte in the range specified by {@code offset} and {@code size} and for each shader stage in {@code stageFlags}, there must be a push constant range in {@code layout} that includes that byte and that stage
  • *
  • For each byte in the range specified by {@code offset} and {@code size} and for each push constant range that overlaps that byte, {@code stageFlags} must include all stages in that push constant range’s {@link VkPushConstantRange}{@code ::stageFlags}
  • *
  • {@code offset} must be a multiple of 4
  • *
  • {@code size} must be a multiple of 4
  • *
  • {@code offset} must be less than {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize}
  • *
  • {@code size} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxPushConstantsSize} minus {@code offset}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code layout} must be a valid {@code VkPipelineLayout} handle
  • *
  • {@code stageFlags} must be a valid combination of {@code VkShaderStageFlagBits} values
  • *
  • {@code stageFlags} must not be 0
  • *
  • {@code pValues} must be a valid pointer to an array of {@code size} bytes
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
  • *
  • {@code size} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and {@code layout} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics Compute
* * @param commandBuffer the command buffer in which the push constant update will be recorded. * @param layout the pipeline layout used to program the push constant updates. * @param stageFlags a bitmask of {@code VkShaderStageFlagBits} specifying the shader stages that will use the push constants in the updated range. * @param offset the start offset of the push constant range to update, in units of bytes. * @param pValues a pointer to an array of {@code size} bytes containing the new push constant values. */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") DoubleBuffer pValues) { nvkCmdPushConstants(commandBuffer, layout, stageFlags, offset, pValues.remaining() << 3, memAddress(pValues)); } // --- [ vkCmdBeginRenderPass ] --- /** Unsafe version of: {@link #vkCmdBeginRenderPass CmdBeginRenderPass} */ public static void nvkCmdBeginRenderPass(VkCommandBuffer commandBuffer, long pRenderPassBegin, int contents) { long __functionAddress = commandBuffer.getCapabilities().vkCmdBeginRenderPass; callPPV(commandBuffer.address(), pRenderPassBegin, contents, __functionAddress); } /** * Begin a new render pass. * *
C Specification
* *

To begin a render pass instance, call:

* *

     * void vkCmdBeginRenderPass(
     *     VkCommandBuffer                             commandBuffer,
     *     const VkRenderPassBeginInfo*                pRenderPassBegin,
     *     VkSubpassContents                           contents);
* *
Description
* *

After beginning a render pass instance, the command buffer is ready to record the commands for the first subpass of that render pass.

* *
Valid Usage
* *
    *
  • If any of the {@code initialLayout} or {@code finalLayout} member of the {@link VkAttachmentDescription} structures or the {@code layout} member of the {@link VkAttachmentReference} structures specified when creating the render pass specified in the {@code renderPass} member of {@code pRenderPassBegin} is {@link #VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL} then the corresponding attachment image view of the framebuffer specified in the {@code framebuffer} member of {@code pRenderPassBegin} must have been created with a {@code usage} value including {@link #VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT IMAGE_USAGE_COLOR_ATTACHMENT_BIT}
  • *
  • If any of the {@code initialLayout} or {@code finalLayout} member of the {@link VkAttachmentDescription} structures or the {@code layout} member of the {@link VkAttachmentReference} structures specified when creating the render pass specified in the {@code renderPass} member of {@code pRenderPassBegin} is {@link VK11#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL}, {@link VK11#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL}, {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL}, or {@link #VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL} then the corresponding attachment image view of the framebuffer specified in the {@code framebuffer} member of {@code pRenderPassBegin} must have been created with a {@code usage} value including {@link #VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT}
  • *
  • If any of the {@code initialLayout} or {@code finalLayout} member of the {@link VkAttachmentDescription} structures or the {@code layout} member of the {@link VkAttachmentReference} structures specified when creating the render pass specified in the {@code renderPass} member of {@code pRenderPassBegin} is {@link VK12#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL}, or {@link VK12#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL}, {@link VK12#VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL}, or {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL} then the corresponding attachment image view of the framebuffer specified in the {@code framebuffer} member of {@code pRenderPassBegin} must have been created with a {@code usage} value including {@link #VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT}
  • *
  • If any of the {@code stencilInitialLayout} or {@code stencilFinalLayout} member of the {@link VkAttachmentDescriptionStencilLayout} structures or the {@code stencilLayout} member of the {@link VkAttachmentReferenceStencilLayout} structures specified when creating the render pass specified in the {@code renderPass} member of {@code pRenderPassBegin} is {@link VK12#VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL}, or {@link VK12#VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL} then the corresponding attachment image view of the framebuffer specified in the {@code framebuffer} member of {@code pRenderPassBegin} must have been created with a {@code usage} value including {@link #VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT}
  • *
  • If any of the {@code initialLayout} or {@code finalLayout} member of the {@link VkAttachmentDescription} structures or the {@code layout} member of the {@link VkAttachmentReference} structures specified when creating the render pass specified in the {@code renderPass} member of {@code pRenderPassBegin} is {@link #VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL} then the corresponding attachment image view of the framebuffer specified in the {@code framebuffer} member of {@code pRenderPassBegin} must have been created with a {@code usage} value including {@link #VK_IMAGE_USAGE_SAMPLED_BIT IMAGE_USAGE_SAMPLED_BIT} or {@link #VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT IMAGE_USAGE_INPUT_ATTACHMENT_BIT}
  • *
  • If any of the {@code initialLayout} or {@code finalLayout} member of the {@link VkAttachmentDescription} structures or the {@code layout} member of the {@link VkAttachmentReference} structures specified when creating the render pass specified in the {@code renderPass} member of {@code pRenderPassBegin} is {@link #VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL} then the corresponding attachment image view of the framebuffer specified in the {@code framebuffer} member of {@code pRenderPassBegin} must have been created with a {@code usage} value including {@link #VK_IMAGE_USAGE_TRANSFER_SRC_BIT IMAGE_USAGE_TRANSFER_SRC_BIT}
  • *
  • If any of the {@code initialLayout} or {@code finalLayout} member of the {@link VkAttachmentDescription} structures or the {@code layout} member of the {@link VkAttachmentReference} structures specified when creating the render pass specified in the {@code renderPass} member of {@code pRenderPassBegin} is {@link #VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL} then the corresponding attachment image view of the framebuffer specified in the {@code framebuffer} member of {@code pRenderPassBegin} must have been created with a {@code usage} value including {@link #VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT}
  • *
  • If the {@code initialLayout} member of any of the {@link VkAttachmentDescription} structures specified when creating the render pass specified in the {@code renderPass} member of {@code pRenderPassBegin} is not {@link #VK_IMAGE_LAYOUT_UNDEFINED IMAGE_LAYOUT_UNDEFINED}, then each such {@code initialLayout} must be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in the {@code framebuffer} member of {@code pRenderPassBegin}
  • *
  • The {@code srcStageMask} and {@code dstStageMask} members of any element of the {@code pDependencies} member of {@link VkRenderPassCreateInfo} used to create {@code renderPass} must be supported by the capabilities of the queue family identified by the {@code queueFamilyIndex} member of the {@link VkCommandPoolCreateInfo} used to create the command pool which {@code commandBuffer} was allocated from
  • *
  • For any attachment in {@code framebuffer} that is used by {@code renderPass} and is bound to memory locations that are also bound to another attachment used by {@code renderPass}, and if at least one of those uses causes either attachment to be written to, both attachments must have had the {@link #VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT} set
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pRenderPassBegin} must be a valid pointer to a valid {@link VkRenderPassBeginInfo} structure
  • *
  • {@code contents} must be a valid {@code VkSubpassContents} value
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called outside of a render pass instance
  • *
  • {@code commandBuffer} must be a primary {@code VkCommandBuffer}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
PrimaryOutsideGraphics
* *
See Also
* *

{@link VkRenderPassBeginInfo}

* * @param commandBuffer the command buffer in which to record the command. * @param pRenderPassBegin a pointer to a {@link VkRenderPassBeginInfo} structure specifying the render pass to begin an instance of, and the framebuffer the instance uses. * @param contents a {@code VkSubpassContents} value specifying how the commands in the first subpass will be provided. */ public static void vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, @NativeType("VkRenderPassBeginInfo const *") VkRenderPassBeginInfo pRenderPassBegin, @NativeType("VkSubpassContents") int contents) { nvkCmdBeginRenderPass(commandBuffer, pRenderPassBegin.address(), contents); } // --- [ vkCmdNextSubpass ] --- /** * Transition to the next subpass of a render pass. * *
C Specification
* *

To transition to the next subpass in the render pass instance after recording the commands for a subpass, call:

* *

     * void vkCmdNextSubpass(
     *     VkCommandBuffer                             commandBuffer,
     *     VkSubpassContents                           contents);
* *
Description
* *

The subpass index for a render pass begins at zero when {@code vkCmdBeginRenderPass} is recorded, and increments each time {@code vkCmdNextSubpass} is recorded.

* *

Moving to the next subpass automatically performs any multisample resolve operations in the subpass being ended. End-of-subpass multisample resolves are treated as color attachment writes for the purposes of synchronization. This applies to resolve operations for both color and depth/stencil attachments. That is, they are considered to execute in the {@link #VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT} pipeline stage and their writes are synchronized with {@link #VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT ACCESS_COLOR_ATTACHMENT_WRITE_BIT}. Synchronization between rendering within a subpass and any resolve operations at the end of the subpass occurs automatically, without need for explicit dependencies or pipeline barriers. However, if the resolve attachment is also used in a different subpass, an explicit dependency is needed.

* *

After transitioning to the next subpass, the application can record the commands for that subpass.

* *
Valid Usage
* *
    *
  • The current subpass index must be less than the number of subpasses in the render pass minus one
  • *
  • This command must not be recorded when transform feedback is active
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code contents} must be a valid {@code VkSubpassContents} value
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called inside of a render pass instance
  • *
  • {@code commandBuffer} must be a primary {@code VkCommandBuffer}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
PrimaryInsideGraphics
* * @param commandBuffer the command buffer in which to record the command. * @param contents specifies how the commands in the next subpass will be provided, in the same fashion as the corresponding parameter of {@link #vkCmdBeginRenderPass CmdBeginRenderPass}. */ public static void vkCmdNextSubpass(VkCommandBuffer commandBuffer, @NativeType("VkSubpassContents") int contents) { long __functionAddress = commandBuffer.getCapabilities().vkCmdNextSubpass; callPV(commandBuffer.address(), contents, __functionAddress); } // --- [ vkCmdEndRenderPass ] --- /** * End the current render pass. * *
C Specification
* *

To record a command to end a render pass instance after recording the commands for the last subpass, call:

* *

     * void vkCmdEndRenderPass(
     *     VkCommandBuffer                             commandBuffer);
* *
Description
* *

Ending a render pass instance performs any multisample resolve operations on the final subpass.

* *
Valid Usage
* *
    *
  • The current subpass index must be equal to the number of subpasses in the render pass minus one
  • *
  • This command must not be recorded when transform feedback is active
  • *
  • The current render pass instance must not have been begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
  • This command must only be called inside of a render pass instance
  • *
  • {@code commandBuffer} must be a primary {@code VkCommandBuffer}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
PrimaryInsideGraphics
* * @param commandBuffer the command buffer in which to end the current render pass instance. */ public static void vkCmdEndRenderPass(VkCommandBuffer commandBuffer) { long __functionAddress = commandBuffer.getCapabilities().vkCmdEndRenderPass; callPV(commandBuffer.address(), __functionAddress); } // --- [ vkCmdExecuteCommands ] --- /** * Unsafe version of: {@link #vkCmdExecuteCommands CmdExecuteCommands} * * @param commandBufferCount the length of the {@code pCommandBuffers} array. */ public static void nvkCmdExecuteCommands(VkCommandBuffer commandBuffer, int commandBufferCount, long pCommandBuffers) { long __functionAddress = commandBuffer.getCapabilities().vkCmdExecuteCommands; callPPV(commandBuffer.address(), commandBufferCount, pCommandBuffers, __functionAddress); } /** * Execute a secondary command buffer from a primary command buffer. * *
C Specification
* *

A secondary command buffer must not be directly submitted to a queue. Instead, secondary command buffers are recorded to execute as part of a primary command buffer with the command:

* *

     * void vkCmdExecuteCommands(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    commandBufferCount,
     *     const VkCommandBuffer*                      pCommandBuffers);
* *
Description
* *

If any element of {@code pCommandBuffers} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} flag, and it was recorded into any other primary command buffer which is currently in the executable or recording state, that primary command buffer becomes invalid.

* *
Valid Usage
* *
    *
  • Each element of {@code pCommandBuffers} must have been allocated with a {@code level} of {@link #VK_COMMAND_BUFFER_LEVEL_SECONDARY COMMAND_BUFFER_LEVEL_SECONDARY}
  • *
  • Each element of {@code pCommandBuffers} must be in the pending or executable state
  • *
  • If any element of {@code pCommandBuffers} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} flag, it must not be in the pending state
  • *
  • If any element of {@code pCommandBuffers} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} flag, it must not have already been recorded to {@code commandBuffer}
  • *
  • If any element of {@code pCommandBuffers} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} flag, it must not appear more than once in {@code pCommandBuffers}
  • *
  • Each element of {@code pCommandBuffers} must have been allocated from a {@code VkCommandPool} that was created for the same queue family as the {@code VkCommandPool} from which {@code commandBuffer} was allocated
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance, each element of {@code pCommandBuffers} must have been recorded with the {@link #VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance, and any element of {@code pCommandBuffers} was recorded with {@link VkCommandBufferInheritanceInfo}{@code ::framebuffer} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE}, that {@code VkFramebuffer} must match the {@code VkFramebuffer} used in the current render pass instance
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link #vkCmdBeginRenderPass CmdBeginRenderPass}, its {@code contents} parameter must have been set to {@link #VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link #vkCmdBeginRenderPass CmdBeginRenderPass}, each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceInfo}{@code ::subpass} set to the index of the subpass which the given command buffer will be executed in
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link #vkCmdBeginRenderPass CmdBeginRenderPass}, the render passes specified in the {@code pBeginInfo→pInheritanceInfo→renderPass} members of the {@link #vkBeginCommandBuffer BeginCommandBuffer} commands used to begin recording each element of {@code pCommandBuffers} must be compatible with the current render pass
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance that included {@link VkRenderPassTransformBeginInfoQCOM} in the {@code pNext} chain of {@link VkRenderPassBeginInfo}, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceRenderPassTransformInfoQCOM} in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance that included {@link VkRenderPassTransformBeginInfoQCOM} in the {@code pNext} chain of {@link VkRenderPassBeginInfo}, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceRenderPassTransformInfoQCOM}{@code ::transform} identical to {@link VkRenderPassTransformBeginInfoQCOM}{@code ::transform}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance that included {@link VkRenderPassTransformBeginInfoQCOM} in the {@code pNext} chain of {@link VkRenderPassBeginInfo}, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceRenderPassTransformInfoQCOM}{@code ::renderArea} identical to {@link VkRenderPassBeginInfo}{@code ::renderArea}
  • *
  • If {@code vkCmdExecuteCommands} is not being called within a render pass instance, each element of {@code pCommandBuffers} must not have been recorded with the {@link #VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT}
  • *
  • If the inherited queries feature is not enabled, {@code commandBuffer} must not have any queries active
  • *
  • If {@code commandBuffer} has a {@link #VK_QUERY_TYPE_OCCLUSION QUERY_TYPE_OCCLUSION} query active, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceInfo}{@code ::occlusionQueryEnable} set to {@link #VK_TRUE TRUE}
  • *
  • If {@code commandBuffer} has a {@link #VK_QUERY_TYPE_OCCLUSION QUERY_TYPE_OCCLUSION} query active, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceInfo}{@code ::queryFlags} having all bits set that are set for the query
  • *
  • If {@code commandBuffer} has a {@link #VK_QUERY_TYPE_PIPELINE_STATISTICS QUERY_TYPE_PIPELINE_STATISTICS} query active, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceInfo}{@code ::pipelineStatistics} having all bits set that are set in the {@code VkQueryPool} the query uses
  • *
  • Each element of {@code pCommandBuffers} must not begin any query types that are active in {@code commandBuffer}
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, each element of {@code pCommandBuffers} must be a protected command buffer
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, each element of {@code pCommandBuffers} must be an unprotected command buffer
  • *
  • This command must not be recorded when transform feedback is active
  • *
  • If {@code pCommandBuffers} contains any suspended render pass instances, there must be no action or synchronization commands between that render pass instance and any render pass instance that resumes it
  • *
  • If {@code pCommandBuffers} contains any suspended render pass instances, there must be no render pass instances between that render pass instance and any render pass instance that resumes it
  • *
  • If the {@code variableSampleLocations} limit is not supported, and any element of {@code pCommandBuffers} contains any suspended render pass instances, where a graphics pipeline has been bound, any pipelines bound in the render pass instance that resumes it, or any subsequent render pass instances that resume from that one and so on, must use the same sample locations
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, its {@link VkRenderingInfoKHR}{@code ::flags} parameter must have included {@link KHRDynamicRendering#VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the render passes specified in the {@code pBeginInfo→pInheritanceInfo→renderPass} members of the {@link #vkBeginCommandBuffer BeginCommandBuffer} commands used to begin recording each element of {@code pCommandBuffers} must be {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code flags} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the {@link VkRenderingInfoKHR}{@code ::flags} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, excluding {@link KHRDynamicRendering#VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code colorAttachmentCount} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, if the {@code imageView} member of an element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the corresponding element of the {@code pColorAttachmentFormats} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the format used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, if the {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthAttachmentFormat} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the format used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, if the {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code stencilAttachmentFormat} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the format used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code viewMask} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the {@link VkRenderingInfoKHR}{@code ::viewMask} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} includes a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@code imageView} member of an element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the corresponding element of the {@code pColorAttachmentSamples} member of the {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} includes a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of the {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} includes a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of the {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} does not include a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@code imageView} member of an element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkCommandBufferInheritanceRenderingInfoKHR}{@code ::rasterizationSamples} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} does not include a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkCommandBufferInheritanceRenderingInfoKHR}{@code ::rasterizationSamples} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} does not include a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkCommandBufferInheritanceRenderingInfoKHR}{@code ::rasterizationSamples} must be equal to the sample count used to create that image view
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pCommandBuffers} must be a valid pointer to an array of {@code commandBufferCount} valid {@code VkCommandBuffer} handles
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • {@code commandBuffer} must be a primary {@code VkCommandBuffer}
  • *
  • {@code commandBufferCount} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and the elements of {@code pCommandBuffers} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
PrimaryBothTransfer Graphics Compute
* * @param commandBuffer a handle to a primary command buffer that the secondary command buffers are executed in. * @param pCommandBuffers a pointer to an array of {@code commandBufferCount} secondary command buffer handles, which are recorded to execute in the primary command buffer in the order they are listed in the array. */ public static void vkCmdExecuteCommands(VkCommandBuffer commandBuffer, @NativeType("VkCommandBuffer const *") PointerBuffer pCommandBuffers) { nvkCmdExecuteCommands(commandBuffer, pCommandBuffers.remaining(), memAddress(pCommandBuffers)); } /** * Execute a secondary command buffer from a primary command buffer. * *
C Specification
* *

A secondary command buffer must not be directly submitted to a queue. Instead, secondary command buffers are recorded to execute as part of a primary command buffer with the command:

* *

     * void vkCmdExecuteCommands(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    commandBufferCount,
     *     const VkCommandBuffer*                      pCommandBuffers);
* *
Description
* *

If any element of {@code pCommandBuffers} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} flag, and it was recorded into any other primary command buffer which is currently in the executable or recording state, that primary command buffer becomes invalid.

* *
Valid Usage
* *
    *
  • Each element of {@code pCommandBuffers} must have been allocated with a {@code level} of {@link #VK_COMMAND_BUFFER_LEVEL_SECONDARY COMMAND_BUFFER_LEVEL_SECONDARY}
  • *
  • Each element of {@code pCommandBuffers} must be in the pending or executable state
  • *
  • If any element of {@code pCommandBuffers} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} flag, it must not be in the pending state
  • *
  • If any element of {@code pCommandBuffers} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} flag, it must not have already been recorded to {@code commandBuffer}
  • *
  • If any element of {@code pCommandBuffers} was not recorded with the {@link #VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT} flag, it must not appear more than once in {@code pCommandBuffers}
  • *
  • Each element of {@code pCommandBuffers} must have been allocated from a {@code VkCommandPool} that was created for the same queue family as the {@code VkCommandPool} from which {@code commandBuffer} was allocated
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance, each element of {@code pCommandBuffers} must have been recorded with the {@link #VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance, and any element of {@code pCommandBuffers} was recorded with {@link VkCommandBufferInheritanceInfo}{@code ::framebuffer} not equal to {@link #VK_NULL_HANDLE NULL_HANDLE}, that {@code VkFramebuffer} must match the {@code VkFramebuffer} used in the current render pass instance
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link #vkCmdBeginRenderPass CmdBeginRenderPass}, its {@code contents} parameter must have been set to {@link #VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link #vkCmdBeginRenderPass CmdBeginRenderPass}, each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceInfo}{@code ::subpass} set to the index of the subpass which the given command buffer will be executed in
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link #vkCmdBeginRenderPass CmdBeginRenderPass}, the render passes specified in the {@code pBeginInfo→pInheritanceInfo→renderPass} members of the {@link #vkBeginCommandBuffer BeginCommandBuffer} commands used to begin recording each element of {@code pCommandBuffers} must be compatible with the current render pass
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance that included {@link VkRenderPassTransformBeginInfoQCOM} in the {@code pNext} chain of {@link VkRenderPassBeginInfo}, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceRenderPassTransformInfoQCOM} in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance that included {@link VkRenderPassTransformBeginInfoQCOM} in the {@code pNext} chain of {@link VkRenderPassBeginInfo}, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceRenderPassTransformInfoQCOM}{@code ::transform} identical to {@link VkRenderPassTransformBeginInfoQCOM}{@code ::transform}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance that included {@link VkRenderPassTransformBeginInfoQCOM} in the {@code pNext} chain of {@link VkRenderPassBeginInfo}, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceRenderPassTransformInfoQCOM}{@code ::renderArea} identical to {@link VkRenderPassBeginInfo}{@code ::renderArea}
  • *
  • If {@code vkCmdExecuteCommands} is not being called within a render pass instance, each element of {@code pCommandBuffers} must not have been recorded with the {@link #VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT}
  • *
  • If the inherited queries feature is not enabled, {@code commandBuffer} must not have any queries active
  • *
  • If {@code commandBuffer} has a {@link #VK_QUERY_TYPE_OCCLUSION QUERY_TYPE_OCCLUSION} query active, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceInfo}{@code ::occlusionQueryEnable} set to {@link #VK_TRUE TRUE}
  • *
  • If {@code commandBuffer} has a {@link #VK_QUERY_TYPE_OCCLUSION QUERY_TYPE_OCCLUSION} query active, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceInfo}{@code ::queryFlags} having all bits set that are set for the query
  • *
  • If {@code commandBuffer} has a {@link #VK_QUERY_TYPE_PIPELINE_STATISTICS QUERY_TYPE_PIPELINE_STATISTICS} query active, then each element of {@code pCommandBuffers} must have been recorded with {@link VkCommandBufferInheritanceInfo}{@code ::pipelineStatistics} having all bits set that are set in the {@code VkQueryPool} the query uses
  • *
  • Each element of {@code pCommandBuffers} must not begin any query types that are active in {@code commandBuffer}
  • *
  • If {@code commandBuffer} is a protected command buffer and {@code protectedNoFault} is not supported, each element of {@code pCommandBuffers} must be a protected command buffer
  • *
  • If {@code commandBuffer} is an unprotected command buffer and {@code protectedNoFault} is not supported, each element of {@code pCommandBuffers} must be an unprotected command buffer
  • *
  • This command must not be recorded when transform feedback is active
  • *
  • If {@code pCommandBuffers} contains any suspended render pass instances, there must be no action or synchronization commands between that render pass instance and any render pass instance that resumes it
  • *
  • If {@code pCommandBuffers} contains any suspended render pass instances, there must be no render pass instances between that render pass instance and any render pass instance that resumes it
  • *
  • If the {@code variableSampleLocations} limit is not supported, and any element of {@code pCommandBuffers} contains any suspended render pass instances, where a graphics pipeline has been bound, any pipelines bound in the render pass instance that resumes it, or any subsequent render pass instances that resume from that one and so on, must use the same sample locations
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, its {@link VkRenderingInfoKHR}{@code ::flags} parameter must have included {@link KHRDynamicRendering#VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the render passes specified in the {@code pBeginInfo→pInheritanceInfo→renderPass} members of the {@link #vkBeginCommandBuffer BeginCommandBuffer} commands used to begin recording each element of {@code pCommandBuffers} must be {@link #VK_NULL_HANDLE NULL_HANDLE}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code flags} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the {@link VkRenderingInfoKHR}{@code ::flags} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, excluding {@link KHRDynamicRendering#VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code colorAttachmentCount} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the {@link VkRenderingInfoKHR}{@code ::colorAttachmentCount} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, if the {@code imageView} member of an element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the corresponding element of the {@code pColorAttachmentFormats} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the format used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, if the {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthAttachmentFormat} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the format used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, if the {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code stencilAttachmentFormat} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the format used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}, the {@code viewMask} member of the {@link VkCommandBufferInheritanceRenderingInfoKHR} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the {@link VkRenderingInfoKHR}{@code ::viewMask} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR}
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} includes a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@code imageView} member of an element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the corresponding element of the {@code pColorAttachmentSamples} member of the {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} includes a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of the {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} includes a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of the {@code depthStencilAttachmentSamples} member of the {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure included in the {@code pNext} chain of {@link VkCommandBufferBeginInfo}{@code ::pInheritanceInfo} used to begin recording each element of {@code pCommandBuffers} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} does not include a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@code imageView} member of an element of the {@link VkRenderingInfoKHR}{@code ::pColorAttachments} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkCommandBufferInheritanceRenderingInfoKHR}{@code ::rasterizationSamples} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} does not include a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@link VkRenderingInfoKHR}{@code ::pDepthAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkCommandBufferInheritanceRenderingInfoKHR}{@code ::rasterizationSamples} must be equal to the sample count used to create that image view
  • *
  • If {@code vkCmdExecuteCommands} is being called within a render pass instance begun with {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} and the {@code pNext} chain of {@link VkCommandBufferInheritanceInfo} does not include a {@link VkAttachmentSampleCountInfoAMD} or {@link VkAttachmentSampleCountInfoNV} structure, if the {@link VkRenderingInfoKHR}{@code ::pStencilAttachment→imageView} parameter to {@link KHRDynamicRendering#vkCmdBeginRenderingKHR CmdBeginRenderingKHR} is not {@link #VK_NULL_HANDLE NULL_HANDLE}, the value of {@link VkCommandBufferInheritanceRenderingInfoKHR}{@code ::rasterizationSamples} must be equal to the sample count used to create that image view
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pCommandBuffers} must be a valid pointer to an array of {@code commandBufferCount} valid {@code VkCommandBuffer} handles
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support transfer, graphics, or compute operations
  • *
  • {@code commandBuffer} must be a primary {@code VkCommandBuffer}
  • *
  • {@code commandBufferCount} must be greater than 0
  • *
  • Both of {@code commandBuffer}, and the elements of {@code pCommandBuffers} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
PrimaryBothTransfer Graphics Compute
* * @param commandBuffer a handle to a primary command buffer that the secondary command buffers are executed in. */ public static void vkCmdExecuteCommands(VkCommandBuffer commandBuffer, @NativeType("VkCommandBuffer const *") VkCommandBuffer pCommandBuffer) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { PointerBuffer pCommandBuffers = stack.pointers(pCommandBuffer); nvkCmdExecuteCommands(commandBuffer, 1, memAddress(pCommandBuffers)); } finally { stack.setPointer(stackPointer); } } // --- [ VK_MAKE_VERSION ] --- /** * Constructs an API version number. * *

This macro can be used when constructing the {@link VkApplicationInfo}{@code ::pname:apiVersion} parameter passed to {@link #vkCreateInstance CreateInstance}.

* * @param major the major version number * @param minor the minor version number * @param patch the patch version number */ @NativeType("uint32_t") public static int VK_MAKE_VERSION(@NativeType("uint32_t") int major, @NativeType("uint32_t") int minor, @NativeType("uint32_t") int patch) { return (major << 22) | (minor << 12) | patch; } // --- [ VK_VERSION_MAJOR ] --- /** * Extracts the API major version number from a packed version number. * * @param version the Vulkan API version */ @NativeType("uint32_t") public static int VK_VERSION_MAJOR(@NativeType("uint32_t") int version) { return version >>> 22; } // --- [ VK_VERSION_MINOR ] --- /** * Extracts the API minor version number from a packed version number. * * @param version the Vulkan API version */ @NativeType("uint32_t") public static int VK_VERSION_MINOR(@NativeType("uint32_t") int version) { return (version >>> 12) & 0x3FF; } // --- [ VK_VERSION_PATCH ] --- /** * Extracts the API patch version number from a packed version number. * * @param version the Vulkan API version */ @NativeType("uint32_t") public static int VK_VERSION_PATCH(@NativeType("uint32_t") int version) { return version & 0xFFF; } /** Array version of: {@link #vkEnumeratePhysicalDevices EnumeratePhysicalDevices} */ @NativeType("VkResult") public static int vkEnumeratePhysicalDevices(VkInstance instance, @NativeType("uint32_t *") int[] pPhysicalDeviceCount, @Nullable @NativeType("VkPhysicalDevice *") PointerBuffer pPhysicalDevices) { long __functionAddress = instance.getCapabilities().vkEnumeratePhysicalDevices; if (CHECKS) { check(pPhysicalDeviceCount, 1); checkSafe(pPhysicalDevices, pPhysicalDeviceCount[0]); } return callPPPI(instance.address(), pPhysicalDeviceCount, memAddressSafe(pPhysicalDevices), __functionAddress); } /** Array version of: {@link #vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties} */ public static void vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, @NativeType("uint32_t *") int[] pQueueFamilyPropertyCount, @Nullable @NativeType("VkQueueFamilyProperties *") VkQueueFamilyProperties.Buffer pQueueFamilyProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceQueueFamilyProperties; if (CHECKS) { check(pQueueFamilyPropertyCount, 1); checkSafe(pQueueFamilyProperties, pQueueFamilyPropertyCount[0]); } callPPPV(physicalDevice.address(), pQueueFamilyPropertyCount, memAddressSafe(pQueueFamilyProperties), __functionAddress); } /** Array version of: {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties} */ @NativeType("VkResult") public static int vkEnumerateInstanceExtensionProperties(@Nullable @NativeType("char const *") ByteBuffer pLayerName, @NativeType("uint32_t *") int[] pPropertyCount, @Nullable @NativeType("VkExtensionProperties *") VkExtensionProperties.Buffer pProperties) { long __functionAddress = VK.getGlobalCommands().vkEnumerateInstanceExtensionProperties; if (CHECKS) { checkNT1Safe(pLayerName); check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount[0]); } return callPPPI(memAddressSafe(pLayerName), pPropertyCount, memAddressSafe(pProperties), __functionAddress); } /** Array version of: {@link #vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties} */ @NativeType("VkResult") public static int vkEnumerateInstanceExtensionProperties(@Nullable @NativeType("char const *") CharSequence pLayerName, @NativeType("uint32_t *") int[] pPropertyCount, @Nullable @NativeType("VkExtensionProperties *") VkExtensionProperties.Buffer pProperties) { long __functionAddress = VK.getGlobalCommands().vkEnumerateInstanceExtensionProperties; if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount[0]); } MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nUTF8Safe(pLayerName, true); long pLayerNameEncoded = pLayerName == null ? NULL : stack.getPointerAddress(); return callPPPI(pLayerNameEncoded, pPropertyCount, memAddressSafe(pProperties), __functionAddress); } finally { stack.setPointer(stackPointer); } } /** Array version of: {@link #vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties} */ @NativeType("VkResult") public static int vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, @Nullable @NativeType("char const *") ByteBuffer pLayerName, @NativeType("uint32_t *") int[] pPropertyCount, @Nullable @NativeType("VkExtensionProperties *") VkExtensionProperties.Buffer pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkEnumerateDeviceExtensionProperties; if (CHECKS) { checkNT1Safe(pLayerName); check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount[0]); } return callPPPPI(physicalDevice.address(), memAddressSafe(pLayerName), pPropertyCount, memAddressSafe(pProperties), __functionAddress); } /** Array version of: {@link #vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties} */ @NativeType("VkResult") public static int vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, @Nullable @NativeType("char const *") CharSequence pLayerName, @NativeType("uint32_t *") int[] pPropertyCount, @Nullable @NativeType("VkExtensionProperties *") VkExtensionProperties.Buffer pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkEnumerateDeviceExtensionProperties; if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount[0]); } MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nUTF8Safe(pLayerName, true); long pLayerNameEncoded = pLayerName == null ? NULL : stack.getPointerAddress(); return callPPPPI(physicalDevice.address(), pLayerNameEncoded, pPropertyCount, memAddressSafe(pProperties), __functionAddress); } finally { stack.setPointer(stackPointer); } } /** Array version of: {@link #vkEnumerateInstanceLayerProperties EnumerateInstanceLayerProperties} */ @NativeType("VkResult") public static int vkEnumerateInstanceLayerProperties(@NativeType("uint32_t *") int[] pPropertyCount, @Nullable @NativeType("VkLayerProperties *") VkLayerProperties.Buffer pProperties) { long __functionAddress = VK.getGlobalCommands().vkEnumerateInstanceLayerProperties; if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount[0]); } return callPPI(pPropertyCount, memAddressSafe(pProperties), __functionAddress); } /** Array version of: {@link #vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties} */ @NativeType("VkResult") public static int vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, @NativeType("uint32_t *") int[] pPropertyCount, @Nullable @NativeType("VkLayerProperties *") VkLayerProperties.Buffer pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkEnumerateDeviceLayerProperties; if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount[0]); } return callPPPI(physicalDevice.address(), pPropertyCount, memAddressSafe(pProperties), __functionAddress); } /** Array version of: {@link #vkAllocateMemory AllocateMemory} */ @NativeType("VkResult") public static int vkAllocateMemory(VkDevice device, @NativeType("VkMemoryAllocateInfo const *") VkMemoryAllocateInfo pAllocateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkDeviceMemory *") long[] pMemory) { long __functionAddress = device.getCapabilities().vkAllocateMemory; if (CHECKS) { check(pMemory, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pAllocateInfo.address(), memAddressSafe(pAllocator), pMemory, __functionAddress); } /** Array version of: {@link #vkGetDeviceMemoryCommitment GetDeviceMemoryCommitment} */ public static void vkGetDeviceMemoryCommitment(VkDevice device, @NativeType("VkDeviceMemory") long memory, @NativeType("VkDeviceSize *") long[] pCommittedMemoryInBytes) { long __functionAddress = device.getCapabilities().vkGetDeviceMemoryCommitment; if (CHECKS) { check(pCommittedMemoryInBytes, 1); } callPJPV(device.address(), memory, pCommittedMemoryInBytes, __functionAddress); } /** Array version of: {@link #vkGetImageSparseMemoryRequirements GetImageSparseMemoryRequirements} */ public static void vkGetImageSparseMemoryRequirements(VkDevice device, @NativeType("VkImage") long image, @NativeType("uint32_t *") int[] pSparseMemoryRequirementCount, @Nullable @NativeType("VkSparseImageMemoryRequirements *") VkSparseImageMemoryRequirements.Buffer pSparseMemoryRequirements) { long __functionAddress = device.getCapabilities().vkGetImageSparseMemoryRequirements; if (CHECKS) { check(pSparseMemoryRequirementCount, 1); checkSafe(pSparseMemoryRequirements, pSparseMemoryRequirementCount[0]); } callPJPPV(device.address(), image, pSparseMemoryRequirementCount, memAddressSafe(pSparseMemoryRequirements), __functionAddress); } /** Array version of: {@link #vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties} */ public static void vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, @NativeType("VkFormat") int format, @NativeType("VkImageType") int type, @NativeType("VkSampleCountFlagBits") int samples, @NativeType("VkImageUsageFlags") int usage, @NativeType("VkImageTiling") int tiling, @NativeType("uint32_t *") int[] pPropertyCount, @Nullable @NativeType("VkSparseImageFormatProperties *") VkSparseImageFormatProperties.Buffer pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSparseImageFormatProperties; if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount[0]); } callPPPV(physicalDevice.address(), format, type, samples, usage, tiling, pPropertyCount, memAddressSafe(pProperties), __functionAddress); } /** Array version of: {@link #vkCreateFence CreateFence} */ @NativeType("VkResult") public static int vkCreateFence(VkDevice device, @NativeType("VkFenceCreateInfo const *") VkFenceCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkFence *") long[] pFence) { long __functionAddress = device.getCapabilities().vkCreateFence; if (CHECKS) { check(pFence, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pFence, __functionAddress); } /** Array version of: {@link #vkResetFences ResetFences} */ @NativeType("VkResult") public static int vkResetFences(VkDevice device, @NativeType("VkFence const *") long[] pFences) { long __functionAddress = device.getCapabilities().vkResetFences; return callPPI(device.address(), pFences.length, pFences, __functionAddress); } /** Array version of: {@link #vkWaitForFences WaitForFences} */ @NativeType("VkResult") public static int vkWaitForFences(VkDevice device, @NativeType("VkFence const *") long[] pFences, @NativeType("VkBool32") boolean waitAll, @NativeType("uint64_t") long timeout) { long __functionAddress = device.getCapabilities().vkWaitForFences; return callPPJI(device.address(), pFences.length, pFences, waitAll ? 1 : 0, timeout, __functionAddress); } /** Array version of: {@link #vkCreateSemaphore CreateSemaphore} */ @NativeType("VkResult") public static int vkCreateSemaphore(VkDevice device, @NativeType("VkSemaphoreCreateInfo const *") VkSemaphoreCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSemaphore *") long[] pSemaphore) { long __functionAddress = device.getCapabilities().vkCreateSemaphore; if (CHECKS) { check(pSemaphore, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pSemaphore, __functionAddress); } /** Array version of: {@link #vkCreateEvent CreateEvent} */ @NativeType("VkResult") public static int vkCreateEvent(VkDevice device, @NativeType("VkEventCreateInfo const *") VkEventCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkEvent *") long[] pEvent) { long __functionAddress = device.getCapabilities().vkCreateEvent; if (CHECKS) { check(pEvent, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pEvent, __functionAddress); } /** Array version of: {@link #vkCreateQueryPool CreateQueryPool} */ @NativeType("VkResult") public static int vkCreateQueryPool(VkDevice device, @NativeType("VkQueryPoolCreateInfo const *") VkQueryPoolCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkQueryPool *") long[] pQueryPool) { long __functionAddress = device.getCapabilities().vkCreateQueryPool; if (CHECKS) { check(pQueryPool, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pQueryPool, __functionAddress); } /** Array version of: {@link #vkGetQueryPoolResults GetQueryPoolResults} */ @NativeType("VkResult") public static int vkGetQueryPoolResults(VkDevice device, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int firstQuery, @NativeType("uint32_t") int queryCount, @NativeType("void *") int[] pData, @NativeType("VkDeviceSize") long stride, @NativeType("VkQueryResultFlags") int flags) { long __functionAddress = device.getCapabilities().vkGetQueryPoolResults; return callPJPPJI(device.address(), queryPool, firstQuery, queryCount, Integer.toUnsignedLong(pData.length) << 2, pData, stride, flags, __functionAddress); } /** Array version of: {@link #vkGetQueryPoolResults GetQueryPoolResults} */ @NativeType("VkResult") public static int vkGetQueryPoolResults(VkDevice device, @NativeType("VkQueryPool") long queryPool, @NativeType("uint32_t") int firstQuery, @NativeType("uint32_t") int queryCount, @NativeType("void *") long[] pData, @NativeType("VkDeviceSize") long stride, @NativeType("VkQueryResultFlags") int flags) { long __functionAddress = device.getCapabilities().vkGetQueryPoolResults; return callPJPPJI(device.address(), queryPool, firstQuery, queryCount, Integer.toUnsignedLong(pData.length) << 3, pData, stride, flags, __functionAddress); } /** Array version of: {@link #vkCreateBuffer CreateBuffer} */ @NativeType("VkResult") public static int vkCreateBuffer(VkDevice device, @NativeType("VkBufferCreateInfo const *") VkBufferCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkBuffer *") long[] pBuffer) { long __functionAddress = device.getCapabilities().vkCreateBuffer; if (CHECKS) { check(pBuffer, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pBuffer, __functionAddress); } /** Array version of: {@link #vkCreateBufferView CreateBufferView} */ @NativeType("VkResult") public static int vkCreateBufferView(VkDevice device, @NativeType("VkBufferViewCreateInfo const *") VkBufferViewCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkBufferView *") long[] pView) { long __functionAddress = device.getCapabilities().vkCreateBufferView; if (CHECKS) { check(pView, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pView, __functionAddress); } /** Array version of: {@link #vkCreateImage CreateImage} */ @NativeType("VkResult") public static int vkCreateImage(VkDevice device, @NativeType("VkImageCreateInfo const *") VkImageCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkImage *") long[] pImage) { long __functionAddress = device.getCapabilities().vkCreateImage; if (CHECKS) { check(pImage, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pImage, __functionAddress); } /** Array version of: {@link #vkCreateImageView CreateImageView} */ @NativeType("VkResult") public static int vkCreateImageView(VkDevice device, @NativeType("VkImageViewCreateInfo const *") VkImageViewCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkImageView *") long[] pView) { long __functionAddress = device.getCapabilities().vkCreateImageView; if (CHECKS) { check(pView, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pView, __functionAddress); } /** Array version of: {@link #vkCreateShaderModule CreateShaderModule} */ @NativeType("VkResult") public static int vkCreateShaderModule(VkDevice device, @NativeType("VkShaderModuleCreateInfo const *") VkShaderModuleCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkShaderModule *") long[] pShaderModule) { long __functionAddress = device.getCapabilities().vkCreateShaderModule; if (CHECKS) { check(pShaderModule, 1); VkShaderModuleCreateInfo.validate(pCreateInfo.address()); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pShaderModule, __functionAddress); } /** Array version of: {@link #vkCreatePipelineCache CreatePipelineCache} */ @NativeType("VkResult") public static int vkCreatePipelineCache(VkDevice device, @NativeType("VkPipelineCacheCreateInfo const *") VkPipelineCacheCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPipelineCache *") long[] pPipelineCache) { long __functionAddress = device.getCapabilities().vkCreatePipelineCache; if (CHECKS) { check(pPipelineCache, 1); VkPipelineCacheCreateInfo.validate(pCreateInfo.address()); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pPipelineCache, __functionAddress); } /** Array version of: {@link #vkMergePipelineCaches MergePipelineCaches} */ @NativeType("VkResult") public static int vkMergePipelineCaches(VkDevice device, @NativeType("VkPipelineCache") long dstCache, @NativeType("VkPipelineCache const *") long[] pSrcCaches) { long __functionAddress = device.getCapabilities().vkMergePipelineCaches; return callPJPI(device.address(), dstCache, pSrcCaches.length, pSrcCaches, __functionAddress); } /** Array version of: {@link #vkCreateGraphicsPipelines CreateGraphicsPipelines} */ @NativeType("VkResult") public static int vkCreateGraphicsPipelines(VkDevice device, @NativeType("VkPipelineCache") long pipelineCache, @NativeType("VkGraphicsPipelineCreateInfo const *") VkGraphicsPipelineCreateInfo.Buffer pCreateInfos, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPipeline *") long[] pPipelines) { long __functionAddress = device.getCapabilities().vkCreateGraphicsPipelines; if (CHECKS) { check(pPipelines, pCreateInfos.remaining()); Struct.validate(pCreateInfos.address(), pCreateInfos.remaining(), VkGraphicsPipelineCreateInfo.SIZEOF, VkGraphicsPipelineCreateInfo::validate); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPJPPPI(device.address(), pipelineCache, pCreateInfos.remaining(), pCreateInfos.address(), memAddressSafe(pAllocator), pPipelines, __functionAddress); } /** Array version of: {@link #vkCreateComputePipelines CreateComputePipelines} */ @NativeType("VkResult") public static int vkCreateComputePipelines(VkDevice device, @NativeType("VkPipelineCache") long pipelineCache, @NativeType("VkComputePipelineCreateInfo const *") VkComputePipelineCreateInfo.Buffer pCreateInfos, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPipeline *") long[] pPipelines) { long __functionAddress = device.getCapabilities().vkCreateComputePipelines; if (CHECKS) { check(pPipelines, pCreateInfos.remaining()); Struct.validate(pCreateInfos.address(), pCreateInfos.remaining(), VkComputePipelineCreateInfo.SIZEOF, VkComputePipelineCreateInfo::validate); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPJPPPI(device.address(), pipelineCache, pCreateInfos.remaining(), pCreateInfos.address(), memAddressSafe(pAllocator), pPipelines, __functionAddress); } /** Array version of: {@link #vkCreatePipelineLayout CreatePipelineLayout} */ @NativeType("VkResult") public static int vkCreatePipelineLayout(VkDevice device, @NativeType("VkPipelineLayoutCreateInfo const *") VkPipelineLayoutCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkPipelineLayout *") long[] pPipelineLayout) { long __functionAddress = device.getCapabilities().vkCreatePipelineLayout; if (CHECKS) { check(pPipelineLayout, 1); VkPipelineLayoutCreateInfo.validate(pCreateInfo.address()); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pPipelineLayout, __functionAddress); } /** Array version of: {@link #vkCreateSampler CreateSampler} */ @NativeType("VkResult") public static int vkCreateSampler(VkDevice device, @NativeType("VkSamplerCreateInfo const *") VkSamplerCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSampler *") long[] pSampler) { long __functionAddress = device.getCapabilities().vkCreateSampler; if (CHECKS) { check(pSampler, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pSampler, __functionAddress); } /** Array version of: {@link #vkCreateDescriptorSetLayout CreateDescriptorSetLayout} */ @NativeType("VkResult") public static int vkCreateDescriptorSetLayout(VkDevice device, @NativeType("VkDescriptorSetLayoutCreateInfo const *") VkDescriptorSetLayoutCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkDescriptorSetLayout *") long[] pSetLayout) { long __functionAddress = device.getCapabilities().vkCreateDescriptorSetLayout; if (CHECKS) { check(pSetLayout, 1); VkDescriptorSetLayoutCreateInfo.validate(pCreateInfo.address()); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pSetLayout, __functionAddress); } /** Array version of: {@link #vkCreateDescriptorPool CreateDescriptorPool} */ @NativeType("VkResult") public static int vkCreateDescriptorPool(VkDevice device, @NativeType("VkDescriptorPoolCreateInfo const *") VkDescriptorPoolCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkDescriptorPool *") long[] pDescriptorPool) { long __functionAddress = device.getCapabilities().vkCreateDescriptorPool; if (CHECKS) { check(pDescriptorPool, 1); VkDescriptorPoolCreateInfo.validate(pCreateInfo.address()); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pDescriptorPool, __functionAddress); } /** Array version of: {@link #vkAllocateDescriptorSets AllocateDescriptorSets} */ @NativeType("VkResult") public static int vkAllocateDescriptorSets(VkDevice device, @NativeType("VkDescriptorSetAllocateInfo const *") VkDescriptorSetAllocateInfo pAllocateInfo, @NativeType("VkDescriptorSet *") long[] pDescriptorSets) { long __functionAddress = device.getCapabilities().vkAllocateDescriptorSets; if (CHECKS) { check(pDescriptorSets, pAllocateInfo.descriptorSetCount()); VkDescriptorSetAllocateInfo.validate(pAllocateInfo.address()); } return callPPPI(device.address(), pAllocateInfo.address(), pDescriptorSets, __functionAddress); } /** Array version of: {@link #vkFreeDescriptorSets FreeDescriptorSets} */ @NativeType("VkResult") public static int vkFreeDescriptorSets(VkDevice device, @NativeType("VkDescriptorPool") long descriptorPool, @NativeType("VkDescriptorSet const *") long[] pDescriptorSets) { long __functionAddress = device.getCapabilities().vkFreeDescriptorSets; return callPJPI(device.address(), descriptorPool, pDescriptorSets.length, pDescriptorSets, __functionAddress); } /** Array version of: {@link #vkCreateFramebuffer CreateFramebuffer} */ @NativeType("VkResult") public static int vkCreateFramebuffer(VkDevice device, @NativeType("VkFramebufferCreateInfo const *") VkFramebufferCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkFramebuffer *") long[] pFramebuffer) { long __functionAddress = device.getCapabilities().vkCreateFramebuffer; if (CHECKS) { check(pFramebuffer, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pFramebuffer, __functionAddress); } /** Array version of: {@link #vkCreateRenderPass CreateRenderPass} */ @NativeType("VkResult") public static int vkCreateRenderPass(VkDevice device, @NativeType("VkRenderPassCreateInfo const *") VkRenderPassCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkRenderPass *") long[] pRenderPass) { long __functionAddress = device.getCapabilities().vkCreateRenderPass; if (CHECKS) { check(pRenderPass, 1); VkRenderPassCreateInfo.validate(pCreateInfo.address()); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pRenderPass, __functionAddress); } /** Array version of: {@link #vkCreateCommandPool CreateCommandPool} */ @NativeType("VkResult") public static int vkCreateCommandPool(VkDevice device, @NativeType("VkCommandPoolCreateInfo const *") VkCommandPoolCreateInfo pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkCommandPool *") long[] pCommandPool) { long __functionAddress = device.getCapabilities().vkCreateCommandPool; if (CHECKS) { check(pCommandPool, 1); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pCommandPool, __functionAddress); } /** Array version of: {@link #vkCmdSetBlendConstants CmdSetBlendConstants} */ public static void vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, @NativeType("float const *") float[] blendConstants) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetBlendConstants; if (CHECKS) { check(blendConstants, 4); } callPPV(commandBuffer.address(), blendConstants, __functionAddress); } /** Array version of: {@link #vkCmdBindDescriptorSets CmdBindDescriptorSets} */ public static void vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, @NativeType("VkPipelineBindPoint") int pipelineBindPoint, @NativeType("VkPipelineLayout") long layout, @NativeType("uint32_t") int firstSet, @NativeType("VkDescriptorSet const *") long[] pDescriptorSets, @Nullable @NativeType("uint32_t const *") int[] pDynamicOffsets) { long __functionAddress = commandBuffer.getCapabilities().vkCmdBindDescriptorSets; callPJPPV(commandBuffer.address(), pipelineBindPoint, layout, firstSet, pDescriptorSets.length, pDescriptorSets, lengthSafe(pDynamicOffsets), pDynamicOffsets, __functionAddress); } /** Array version of: {@link #vkCmdBindVertexBuffers CmdBindVertexBuffers} */ public static void vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, @NativeType("uint32_t") int firstBinding, @NativeType("VkBuffer const *") long[] pBuffers, @NativeType("VkDeviceSize const *") long[] pOffsets) { long __functionAddress = commandBuffer.getCapabilities().vkCmdBindVertexBuffers; if (CHECKS) { check(pOffsets, pBuffers.length); } callPPPV(commandBuffer.address(), firstBinding, pBuffers.length, pBuffers, pOffsets, __functionAddress); } /** Array version of: {@link #vkCmdUpdateBuffer CmdUpdateBuffer} */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") short[] pData) { long __functionAddress = commandBuffer.getCapabilities().vkCmdUpdateBuffer; callPJJJPV(commandBuffer.address(), dstBuffer, dstOffset, Integer.toUnsignedLong(pData.length) << 1, pData, __functionAddress); } /** Array version of: {@link #vkCmdUpdateBuffer CmdUpdateBuffer} */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") int[] pData) { long __functionAddress = commandBuffer.getCapabilities().vkCmdUpdateBuffer; callPJJJPV(commandBuffer.address(), dstBuffer, dstOffset, Integer.toUnsignedLong(pData.length) << 2, pData, __functionAddress); } /** Array version of: {@link #vkCmdUpdateBuffer CmdUpdateBuffer} */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") long[] pData) { long __functionAddress = commandBuffer.getCapabilities().vkCmdUpdateBuffer; callPJJJPV(commandBuffer.address(), dstBuffer, dstOffset, Integer.toUnsignedLong(pData.length) << 3, pData, __functionAddress); } /** Array version of: {@link #vkCmdUpdateBuffer CmdUpdateBuffer} */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") float[] pData) { long __functionAddress = commandBuffer.getCapabilities().vkCmdUpdateBuffer; callPJJJPV(commandBuffer.address(), dstBuffer, dstOffset, Integer.toUnsignedLong(pData.length) << 2, pData, __functionAddress); } /** Array version of: {@link #vkCmdUpdateBuffer CmdUpdateBuffer} */ public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, @NativeType("VkBuffer") long dstBuffer, @NativeType("VkDeviceSize") long dstOffset, @NativeType("void const *") double[] pData) { long __functionAddress = commandBuffer.getCapabilities().vkCmdUpdateBuffer; callPJJJPV(commandBuffer.address(), dstBuffer, dstOffset, Integer.toUnsignedLong(pData.length) << 3, pData, __functionAddress); } /** Array version of: {@link #vkCmdWaitEvents CmdWaitEvents} */ public static void vkCmdWaitEvents(VkCommandBuffer commandBuffer, @NativeType("VkEvent const *") long[] pEvents, @NativeType("VkPipelineStageFlags") int srcStageMask, @NativeType("VkPipelineStageFlags") int dstStageMask, @Nullable @NativeType("VkMemoryBarrier const *") VkMemoryBarrier.Buffer pMemoryBarriers, @Nullable @NativeType("VkBufferMemoryBarrier const *") VkBufferMemoryBarrier.Buffer pBufferMemoryBarriers, @Nullable @NativeType("VkImageMemoryBarrier const *") VkImageMemoryBarrier.Buffer pImageMemoryBarriers) { long __functionAddress = commandBuffer.getCapabilities().vkCmdWaitEvents; callPPPPPV(commandBuffer.address(), pEvents.length, pEvents, srcStageMask, dstStageMask, remainingSafe(pMemoryBarriers), memAddressSafe(pMemoryBarriers), remainingSafe(pBufferMemoryBarriers), memAddressSafe(pBufferMemoryBarriers), remainingSafe(pImageMemoryBarriers), memAddressSafe(pImageMemoryBarriers), __functionAddress); } /** Array version of: {@link #vkCmdPushConstants CmdPushConstants} */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") short[] pValues) { long __functionAddress = commandBuffer.getCapabilities().vkCmdPushConstants; callPJPV(commandBuffer.address(), layout, stageFlags, offset, pValues.length << 1, pValues, __functionAddress); } /** Array version of: {@link #vkCmdPushConstants CmdPushConstants} */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") int[] pValues) { long __functionAddress = commandBuffer.getCapabilities().vkCmdPushConstants; callPJPV(commandBuffer.address(), layout, stageFlags, offset, pValues.length << 2, pValues, __functionAddress); } /** Array version of: {@link #vkCmdPushConstants CmdPushConstants} */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") long[] pValues) { long __functionAddress = commandBuffer.getCapabilities().vkCmdPushConstants; callPJPV(commandBuffer.address(), layout, stageFlags, offset, pValues.length << 3, pValues, __functionAddress); } /** Array version of: {@link #vkCmdPushConstants CmdPushConstants} */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") float[] pValues) { long __functionAddress = commandBuffer.getCapabilities().vkCmdPushConstants; callPJPV(commandBuffer.address(), layout, stageFlags, offset, pValues.length << 2, pValues, __functionAddress); } /** Array version of: {@link #vkCmdPushConstants CmdPushConstants} */ public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, @NativeType("VkPipelineLayout") long layout, @NativeType("VkShaderStageFlags") int stageFlags, @NativeType("uint32_t") int offset, @NativeType("void const *") double[] pValues) { long __functionAddress = commandBuffer.getCapabilities().vkCmdPushConstants; callPJPV(commandBuffer.address(), layout, stageFlags, offset, pValues.length << 3, pValues, __functionAddress); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy