turnip: Implement an empty function vkCmdDrawIndirectByteCountEXT
authorHyunjun Ko <zzoon@igalia.com>
Thu, 20 Feb 2020 06:46:57 +0000 (15:46 +0900)
committerMarge Bot <eric+marge@anholt.net>
Thu, 12 Mar 2020 03:10:16 +0000 (03:10 +0000)
TODO. We should implement this since indirect draw is enabled.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3942>

src/freedreno/vulkan/tu_cmd_buffer.c

index 4367f8e4dfb7af1a907731eb90eb3742f758a689..d3e04889feb2fe921f4678dbdd994f292d28d486 100644 (file)
@@ -2706,6 +2706,12 @@ struct tu_draw_info
     */
    struct tu_buffer *count_buffer;
    uint64_t count_buffer_offset;
+
+   /**
+    * Stream output parameters resource.
+    */
+   struct tu_buffer *streamout_buffer;
+   uint64_t streamout_buffer_offset;
 };
 
 #define ENABLE_ALL (CP_SET_DRAW_STATE__0_BINNING | CP_SET_DRAW_STATE__0_GMEM | CP_SET_DRAW_STATE__0_SYSMEM)
@@ -3938,6 +3944,28 @@ tu_CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer,
    tu_draw(cmd_buffer, &info);
 }
 
+void tu_CmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer,
+                                    uint32_t instanceCount,
+                                    uint32_t firstInstance,
+                                    VkBuffer _counterBuffer,
+                                    VkDeviceSize counterBufferOffset,
+                                    uint32_t counterOffset,
+                                    uint32_t vertexStride)
+{
+   TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
+   TU_FROM_HANDLE(tu_buffer, buffer, _counterBuffer);
+
+   struct tu_draw_info info = {};
+
+   info.instance_count = instanceCount;
+   info.first_instance = firstInstance;
+   info.streamout_buffer = buffer;
+   info.streamout_buffer_offset = counterBufferOffset;
+   info.stride = vertexStride;
+
+   tu_draw(cmd_buffer, &info);
+}
+
 struct tu_dispatch_info
 {
    /**