Class KHRDeviceGroup
- java.lang.Object
-
- org.lwjgl.vulkan.KHRDeviceGroup
-
public class KHRDeviceGroup extends java.lang.ObjectThis extension provides functionality to use a logical device that consists of multiple physical devices, as created with theVK_KHR_device_group_creationextension. A device group can allocate memory across the subdevices, bind memory from one subdevice to a resource on another subdevice, record command buffers where some work executes on an arbitrary subset of the subdevices, and potentially present a swapchain image from one or more subdevices.Promotion to Vulkan 1.1
The following enums, types and commands are included as interactions with
VK_KHR_swapchain:STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHRSTRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHRSTRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHRSTRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHRSTRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHRSTRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHRSWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHRVkDeviceGroupPresentModeFlagBitsKHRVkDeviceGroupPresentCapabilitiesKHRVkImageSwapchainCreateInfoKHRVkBindImageMemorySwapchainInfoKHRVkAcquireNextImageInfoKHRVkDeviceGroupPresentInfoKHRVkDeviceGroupSwapchainCreateInfoKHRGetDeviceGroupPresentCapabilitiesKHRGetDeviceGroupSurfacePresentModesKHRGetPhysicalDevicePresentRectanglesKHRAcquireNextImage2KHR
If Vulkan 1.1 and VK_KHR_swapchain are supported, these are included by VK_KHR_swapchain.
The base functionality in this extension is included in core Vulkan 1.1, with the KHR suffix omitted. The original type, enum and command names are still available as aliases of the core functionality.
Examples
TODO
- Name String
VK_KHR_device_group- Extension Type
- Device extension
- Registered Extension Number
- 61
- Revision
- 4
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_device_group_creation
- Deprecation state
- Promoted to Vulkan 1.1
- Contact
- Jeff Bolz jeffbolznv
- Last Modified Date
- 2017-10-10
- IP Status
- No known IP claims.
- Interactions and External Dependencies
- Promoted to Vulkan 1.1 Core
- Contributors
- Jeff Bolz, NVIDIA
- Tobias Hector, Imagination Technologies
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnvkAcquireNextImage2KHR(VkDevice device, long pAcquireInfo, long pImageIndex)Unsafe version of:AcquireNextImage2KHRstatic voidnvkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, int heapIndex, int localDeviceIndex, int remoteDeviceIndex, long pPeerMemoryFeatures)Unsafe version of:GetDeviceGroupPeerMemoryFeaturesKHRstatic intnvkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, long pDeviceGroupPresentCapabilities)Unsafe version of:GetDeviceGroupPresentCapabilitiesKHRstatic intnvkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, long pModes)Unsafe version of:GetDeviceGroupSurfacePresentModesKHRstatic intnvkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, long pRectCount, long pRects)Unsafe version of:GetPhysicalDevicePresentRectanglesKHRstatic intvkAcquireNextImage2KHR(VkDevice device, VkAcquireNextImageInfoKHR pAcquireInfo, int[] pImageIndex)Array version of:AcquireNextImage2KHRstatic intvkAcquireNextImage2KHR(VkDevice device, VkAcquireNextImageInfoKHR pAcquireInfo, java.nio.IntBuffer pImageIndex)Retrieve the index of the next available presentable image.static voidvkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, int baseGroupX, int baseGroupY, int baseGroupZ, int groupCountX, int groupCountY, int groupCountZ)SeeCmdDispatchBase.static voidvkCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, int deviceMask)SeeCmdSetDeviceMask.static voidvkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, int heapIndex, int localDeviceIndex, int remoteDeviceIndex, int[] pPeerMemoryFeatures)Array version of:GetDeviceGroupPeerMemoryFeaturesKHRstatic voidvkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, int heapIndex, int localDeviceIndex, int remoteDeviceIndex, java.nio.IntBuffer pPeerMemoryFeatures)static intvkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR pDeviceGroupPresentCapabilities)Query present capabilities from other physical devices.static intvkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, int[] pModes)Array version of:GetDeviceGroupSurfacePresentModesKHRstatic intvkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, java.nio.IntBuffer pModes)Query present capabilities for a surface.static intvkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, int[] pRectCount, VkRect2D.Buffer pRects)Array version of:GetPhysicalDevicePresentRectanglesKHRstatic intvkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, java.nio.IntBuffer pRectCount, VkRect2D.Buffer pRects)Query present rectangles for a surface on a physical device.
-
-
-
Field Detail
-
VK_KHR_DEVICE_GROUP_SPEC_VERSION
The extension specification version.
-
VK_KHR_DEVICE_GROUP_EXTENSION_NAME
The extension name.
-
VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR, VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR, VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR, VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR, VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR
-
VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR, VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR, VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR, VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR
ExtendsVkPeerMemoryFeatureFlagBits.Enum values:
-
VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR
ExtendsVkMemoryAllocateFlagBits.
-
VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR, VK_PIPELINE_CREATE_DISPATCH_BASE_KHR
ExtendsVkPipelineCreateFlagBits.Enum values:
-
VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR
ExtendsVkDependencyFlagBits.
-
VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR
ExtendsVkStructureType.Enum values:
-
VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR
ExtendsVkImageCreateFlagBits.
-
VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR
ExtendsVkStructureType.
-
VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR, VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR, VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR, VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR
-
VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR
ExtendsVkSwapchainCreateFlagBitsKHR.
-
-
Method Detail
-
nvkGetDeviceGroupPeerMemoryFeaturesKHR
public static void nvkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, int heapIndex, int localDeviceIndex, int remoteDeviceIndex, long pPeerMemoryFeatures)
Unsafe version of:GetDeviceGroupPeerMemoryFeaturesKHR
-
vkGetDeviceGroupPeerMemoryFeaturesKHR
public static void vkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, int heapIndex, int localDeviceIndex, int remoteDeviceIndex, java.nio.IntBuffer pPeerMemoryFeatures)
- Parameters:
device- the logical device that owns the memory.heapIndex- the index of the memory heap from which the memory is allocated.localDeviceIndex- the device index of the physical device that performs the memory access.remoteDeviceIndex- the device index of the physical device that the memory is allocated for.pPeerMemoryFeatures- a pointer to a bitmask ofVkPeerMemoryFeatureFlagBitsindicating which types of memory accesses are supported for the combination of heap, local, and remote devices.
-
vkCmdSetDeviceMaskKHR
public static void vkCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, int deviceMask)
SeeCmdSetDeviceMask.- Parameters:
commandBuffer- command buffer whose current device mask is modified.deviceMask- the new value of the current device mask.
-
vkCmdDispatchBaseKHR
public static void vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, int baseGroupX, int baseGroupY, int baseGroupZ, int groupCountX, int groupCountY, int groupCountZ)
SeeCmdDispatchBase.- Parameters:
commandBuffer- the command buffer into which the command will be recorded.baseGroupX- the start value for the X component ofWorkgroupId.baseGroupY- the start value for the Y component ofWorkgroupId.baseGroupZ- the start value for the Z component ofWorkgroupId.groupCountX- the number of local workgroups to dispatch in the X dimension.groupCountY- the number of local workgroups to dispatch in the Y dimension.groupCountZ- the number of local workgroups to dispatch in the Z dimension.
-
nvkGetDeviceGroupPresentCapabilitiesKHR
public static int nvkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, long pDeviceGroupPresentCapabilities)
Unsafe version of:GetDeviceGroupPresentCapabilitiesKHR
-
vkGetDeviceGroupPresentCapabilitiesKHR
public static int vkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR pDeviceGroupPresentCapabilities)
Query present capabilities from other physical devices.C Specification
A logical device that represents multiple physical devices may support presenting from images on more than one physical device, or combining images from multiple physical devices.
To query these capabilities, call:
VkResult vkGetDeviceGroupPresentCapabilitiesKHR( VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities);Valid Usage (Implicit)
devicemust be a validVkDevicehandlepDeviceGroupPresentCapabilitiesmust be a valid pointer to aVkDeviceGroupPresentCapabilitiesKHRstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device.pDeviceGroupPresentCapabilities- a pointer to a structure of typeVkDeviceGroupPresentCapabilitiesKHRthat is filled with the logical device’s capabilities.
-
nvkGetDeviceGroupSurfacePresentModesKHR
public static int nvkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, long pModes)
Unsafe version of:GetDeviceGroupSurfacePresentModesKHR
-
vkGetDeviceGroupSurfacePresentModesKHR
public static int vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, java.nio.IntBuffer pModes)
Query present capabilities for a surface.C Specification
Some surfaces may not be capable of using all the device group present modes.
To query the supported device group present modes for a particular surface, call:
VkResult vkGetDeviceGroupSurfacePresentModesKHR( VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes);Description
The modes returned by this command are not invariant, and may change in response to the surface being moved, resized, or occluded. These modes must be a subset of the modes returned by
GetDeviceGroupPresentCapabilitiesKHR.Valid Usage (Implicit)
devicemust be a validVkDevicehandlesurfacemust be a validVkSurfaceKHRhandlepModesmust be a valid pointer to aVkDeviceGroupPresentModeFlagsKHRvalue- Both of
device, andsurfacemust have been created, allocated, or retrieved from the sameVkInstance
Host Synchronization
- Host access to
surfacemust be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device- the logical device.surface- the surface.pModes- a pointer to a value of typeVkDeviceGroupPresentModeFlagsKHRthat is filled with the supported device group present modes for the surface.
-
nvkGetPhysicalDevicePresentRectanglesKHR
public static int nvkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, long pRectCount, long pRects)
Unsafe version of:GetPhysicalDevicePresentRectanglesKHR- Parameters:
pRectCount- a pointer to an integer related to the number of rectangles available or queried, as described below.
-
vkGetPhysicalDevicePresentRectanglesKHR
public static int vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, java.nio.IntBuffer pRectCount, @Nullable VkRect2D.Buffer pRects)
Query present rectangles for a surface on a physical device.C Specification
When using
DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR, the application may need to know which regions of the surface are used when presenting locally on each physical device. Presentation of swapchain images to this surface need only have valid contents in the regions returned by this command.To query a set of rectangles used in presentation on the physical device, call:
VkResult vkGetPhysicalDevicePresentRectanglesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects);Description
If
pRectsisNULL, then the number of rectangles used when presenting the givensurfaceis returned inpRectCount. Otherwise,pRectCountmust point to a variable set by the user to the number of elements in thepRectsarray, and on return the variable is overwritten with the number of structures actually written topRects. If the value ofpRectCountis less than the number of rectangles, at mostpRectCountstructures will be written. IfpRectCountis smaller than the number of rectangles used for the givensurface,INCOMPLETEwill be returned instead ofSUCCESSto indicate that not all the available values were returned.The values returned by this command are not invariant, and may change in response to the surface being moved, resized, or occluded.
The rectangles returned by this command must not overlap.
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandlesurfacemust be a validVkSurfaceKHRhandlepRectCountmust be a valid pointer to auint32_tvalue- If the value referenced by
pRectCountis not 0, andpRectsis notNULL,pRectsmust be a valid pointer to an array ofpRectCountVkRect2Dstructures - Both of
physicalDevice, andsurfacemust have been created, allocated, or retrieved from the sameVkInstance
Host Synchronization
- Host access to
surfacemust be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
physicalDevice- the physical device.surface- the surface.pRectCount- a pointer to an integer related to the number of rectangles available or queried, as described below.pRects- eitherNULLor a pointer to an array ofVkRect2Dstructures.
-
nvkAcquireNextImage2KHR
public static int nvkAcquireNextImage2KHR(VkDevice device, long pAcquireInfo, long pImageIndex)
Unsafe version of:AcquireNextImage2KHR
-
vkAcquireNextImage2KHR
public static int vkAcquireNextImage2KHR(VkDevice device, VkAcquireNextImageInfoKHR pAcquireInfo, java.nio.IntBuffer pImageIndex)
Retrieve the index of the next available presentable image.C Specification
To acquire an available presentable image to use, and retrieve the index of that image, call:
VkResult vkAcquireNextImage2KHR( VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex);Valid Usage
- If the number of currently acquired images is greater than the difference between the number of images in the
swapchainmember ofpAcquireInfoand the value ofVkSurfaceCapabilitiesKHR::minImageCountas returned by a call toGetPhysicalDeviceSurfaceCapabilities2KHRwith thesurfaceused to createswapchain, thetimeoutmember ofpAcquireInfomust not beUINT64_MAX
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepAcquireInfomust be a valid pointer to a validVkAcquireNextImageInfoKHRstructurepImageIndexmust be a valid pointer to auint32_tvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the device associated withswapchain.pAcquireInfo- a pointer to a structure of typeVkAcquireNextImageInfoKHRcontaining parameters of the acquire.pImageIndex- a pointer to auint32_tthat is set to the index of the next image to use.
- If the number of currently acquired images is greater than the difference between the number of images in the
-
vkGetDeviceGroupPeerMemoryFeaturesKHR
public static void vkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, int heapIndex, int localDeviceIndex, int remoteDeviceIndex, int[] pPeerMemoryFeatures)
Array version of:GetDeviceGroupPeerMemoryFeaturesKHR
-
vkGetDeviceGroupSurfacePresentModesKHR
public static int vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, int[] pModes)
Array version of:GetDeviceGroupSurfacePresentModesKHR
-
vkGetPhysicalDevicePresentRectanglesKHR
public static int vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, int[] pRectCount, @Nullable VkRect2D.Buffer pRects)
Array version of:GetPhysicalDevicePresentRectanglesKHR
-
vkAcquireNextImage2KHR
public static int vkAcquireNextImage2KHR(VkDevice device, VkAcquireNextImageInfoKHR pAcquireInfo, int[] pImageIndex)
Array version of:AcquireNextImage2KHR
-
-