mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
vulkan/runtime: Add VK_KHR_device_group provided entrypoints
Add entrypoints vk_common_CmdDispatch, vk_common_CmdSetDeviceMask, and vk_common_GetDeviceGroupPeerMemoryFeatures in Mesa Vulkan runtime so that they are available to all drivers. Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20218>
This commit is contained in:
parent
2d4a36ce64
commit
83400af043
2 changed files with 36 additions and 0 deletions
|
|
@ -154,3 +154,24 @@ vk_common_CmdBindVertexBuffers(VkCommandBuffer commandBuffer,
|
|||
disp->CmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount,
|
||||
pBuffers, pOffsets, NULL, NULL);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
vk_common_CmdDispatch(VkCommandBuffer commandBuffer,
|
||||
uint32_t groupCountX,
|
||||
uint32_t groupCountY,
|
||||
uint32_t groupCountZ)
|
||||
{
|
||||
VK_FROM_HANDLE(vk_command_buffer, cmd_buffer, commandBuffer);
|
||||
const struct vk_device_dispatch_table *disp =
|
||||
&cmd_buffer->base.device->dispatch_table;
|
||||
|
||||
disp->CmdDispatchBase(commandBuffer, 0, 0, 0,
|
||||
groupCountX, groupCountY, groupCountZ);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
vk_common_CmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask)
|
||||
{
|
||||
/* Nothing to do here since we only support a single device */
|
||||
assert(deviceMask == 0x1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -422,6 +422,21 @@ vk_common_GetDeviceQueue2(VkDevice _device,
|
|||
*pQueue = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
vk_common_GetDeviceGroupPeerMemoryFeatures(
|
||||
VkDevice device,
|
||||
uint32_t heapIndex,
|
||||
uint32_t localDeviceIndex,
|
||||
uint32_t remoteDeviceIndex,
|
||||
VkPeerMemoryFeatureFlags *pPeerMemoryFeatures)
|
||||
{
|
||||
assert(localDeviceIndex == 0 && remoteDeviceIndex == 0);
|
||||
*pPeerMemoryFeatures = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT |
|
||||
VK_PEER_MEMORY_FEATURE_COPY_DST_BIT |
|
||||
VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT |
|
||||
VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT;
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
vk_common_GetBufferMemoryRequirements(VkDevice _device,
|
||||
VkBuffer buffer,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue