Class KHRDeviceGroup
- java.lang.Object
-
- org.lwjgl.vulkan.KHRDeviceGroup
-
public class KHRDeviceGroup extends java.lang.Object
This extension provides functionality to use a logical device that consists of multiple physical devices, as created with theVK_KHR_device_group_creation
extension. 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_KHR
STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR
STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR
STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR
STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR
STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR
SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR
VkDeviceGroupPresentModeFlagBitsKHR
VkDeviceGroupPresentCapabilitiesKHR
VkImageSwapchainCreateInfoKHR
VkBindImageMemorySwapchainInfoKHR
VkAcquireNextImageInfoKHR
VkDeviceGroupPresentInfoKHR
VkDeviceGroupSwapchainCreateInfoKHR
GetDeviceGroupPresentCapabilitiesKHR
GetDeviceGroupSurfacePresentModesKHR
GetPhysicalDevicePresentRectanglesKHR
AcquireNextImage2KHR
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 int
nvkAcquireNextImage2KHR(VkDevice device, long pAcquireInfo, long pImageIndex)
Unsafe version of:AcquireNextImage2KHR
static void
nvkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, int heapIndex, int localDeviceIndex, int remoteDeviceIndex, long pPeerMemoryFeatures)
Unsafe version of:GetDeviceGroupPeerMemoryFeaturesKHR
static int
nvkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, long pDeviceGroupPresentCapabilities)
Unsafe version of:GetDeviceGroupPresentCapabilitiesKHR
static int
nvkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, long pModes)
Unsafe version of:GetDeviceGroupSurfacePresentModesKHR
static int
nvkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, long pRectCount, long pRects)
Unsafe version of:GetPhysicalDevicePresentRectanglesKHR
static int
vkAcquireNextImage2KHR(VkDevice device, VkAcquireNextImageInfoKHR pAcquireInfo, int[] pImageIndex)
Array version of:AcquireNextImage2KHR
static int
vkAcquireNextImage2KHR(VkDevice device, VkAcquireNextImageInfoKHR pAcquireInfo, java.nio.IntBuffer pImageIndex)
Retrieve the index of the next available presentable image.static void
vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, int baseGroupX, int baseGroupY, int baseGroupZ, int groupCountX, int groupCountY, int groupCountZ)
SeeCmdDispatchBase
.static void
vkCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, int deviceMask)
SeeCmdSetDeviceMask
.static void
vkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, int heapIndex, int localDeviceIndex, int remoteDeviceIndex, int[] pPeerMemoryFeatures)
Array version of:GetDeviceGroupPeerMemoryFeaturesKHR
static void
vkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, int heapIndex, int localDeviceIndex, int remoteDeviceIndex, java.nio.IntBuffer pPeerMemoryFeatures)
static int
vkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR pDeviceGroupPresentCapabilities)
Query present capabilities from other physical devices.static int
vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, int[] pModes)
Array version of:GetDeviceGroupSurfacePresentModesKHR
static int
vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, java.nio.IntBuffer pModes)
Query present capabilities for a surface.static int
vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, int[] pRectCount, VkRect2D.Buffer pRects)
Array version of:GetPhysicalDevicePresentRectanglesKHR
static int
vkGetPhysicalDevicePresentRectanglesKHR(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 ofVkPeerMemoryFeatureFlagBits
indicating 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)
device
must be a validVkDevice
handlepDeviceGroupPresentCapabilities
must be a valid pointer to aVkDeviceGroupPresentCapabilitiesKHR
structure
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 typeVkDeviceGroupPresentCapabilitiesKHR
that 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)
device
must be a validVkDevice
handlesurface
must be a validVkSurfaceKHR
handlepModes
must be a valid pointer to aVkDeviceGroupPresentModeFlagsKHR
value- Both of
device
, andsurface
must have been created, allocated, or retrieved from the sameVkInstance
Host Synchronization
- Host access to
surface
must 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 typeVkDeviceGroupPresentModeFlagsKHR
that 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
pRects
isNULL
, then the number of rectangles used when presenting the givensurface
is returned inpRectCount
. Otherwise,pRectCount
must point to a variable set by the user to the number of elements in thepRects
array, and on return the variable is overwritten with the number of structures actually written topRects
. If the value ofpRectCount
is less than the number of rectangles, at mostpRectCount
structures will be written. IfpRectCount
is smaller than the number of rectangles used for the givensurface
,INCOMPLETE
will be returned instead ofSUCCESS
to 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)
physicalDevice
must be a validVkPhysicalDevice
handlesurface
must be a validVkSurfaceKHR
handlepRectCount
must be a valid pointer to auint32_t
value- If the value referenced by
pRectCount
is not 0, andpRects
is notNULL
,pRects
must be a valid pointer to an array ofpRectCount
VkRect2D
structures - Both of
physicalDevice
, andsurface
must have been created, allocated, or retrieved from the sameVkInstance
Host Synchronization
- Host access to
surface
must 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
- eitherNULL
or a pointer to an array ofVkRect2D
structures.
-
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
swapchain
member ofpAcquireInfo
and the value ofVkSurfaceCapabilitiesKHR
::minImageCount
as returned by a call toGetPhysicalDeviceSurfaceCapabilities2KHR
with thesurface
used to createswapchain
, thetimeout
member ofpAcquireInfo
must not beUINT64_MAX
Valid Usage (Implicit)
device
must be a validVkDevice
handlepAcquireInfo
must be a valid pointer to a validVkAcquireNextImageInfoKHR
structurepImageIndex
must be a valid pointer to auint32_t
value
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 typeVkAcquireNextImageInfoKHR
containing parameters of the acquire.pImageIndex
- a pointer to auint32_t
that 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
-
-