vulkan/runtime: add a layered implementation of vkCmdBindIndexBuffer
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 8 Mar 2023 10:34:30 +0000 (12:34 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 13:55:11 +0000 (13:55 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24365>

src/vulkan/runtime/vk_command_buffer.c

index 65a0c62..194d389 100644 (file)
@@ -156,6 +156,21 @@ vk_common_CmdBindVertexBuffers(VkCommandBuffer commandBuffer,
 }
 
 VKAPI_ATTR void VKAPI_CALL
+vk_common_CmdBindIndexBuffer(
+    VkCommandBuffer                             commandBuffer,
+    VkBuffer                                    buffer,
+    VkDeviceSize                                offset,
+    VkIndexType                                 indexType)
+{
+   VK_FROM_HANDLE(vk_command_buffer, cmd_buffer, commandBuffer);
+   const struct vk_device_dispatch_table *disp =
+      &cmd_buffer->base.device->dispatch_table;
+
+   disp->CmdBindIndexBuffer2KHR(commandBuffer, buffer, offset,
+                                VK_WHOLE_SIZE, indexType);
+}
+
+VKAPI_ATTR void VKAPI_CALL
 vk_common_CmdDispatch(VkCommandBuffer commandBuffer,
                       uint32_t groupCountX,
                       uint32_t groupCountY,