From 4a45c84672f7eafef23c6210f3d8dd56ae020242 Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Thu, 20 Feb 2020 15:46:57 +0900 Subject: [PATCH] turnip: Implement an empty function vkCmdDrawIndirectByteCountEXT TODO. We should implement this since indirect draw is enabled. Signed-off-by: Hyunjun Ko Reviewed-by: Jonathan Marek Part-of: --- src/freedreno/vulkan/tu_cmd_buffer.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 4367f8e4dfb..d3e04889feb 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -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 { /** -- 2.30.2