diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-02-09 15:00:05 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-01 22:43:57 +0100 |
commit | a5a94f52ffcbf3119d272a9369021a213ea6dad2 (patch) | |
tree | ba6d42b142894d0f3f0ac34fb6ce491442bae8fd /src/video_core/vulkan_common | |
parent | Merge pull request #9538 from merryhime/char-concat (diff) | |
download | yuzu-a5a94f52ffcbf3119d272a9369021a213ea6dad2.tar yuzu-a5a94f52ffcbf3119d272a9369021a213ea6dad2.tar.gz yuzu-a5a94f52ffcbf3119d272a9369021a213ea6dad2.tar.bz2 yuzu-a5a94f52ffcbf3119d272a9369021a213ea6dad2.tar.lz yuzu-a5a94f52ffcbf3119d272a9369021a213ea6dad2.tar.xz yuzu-a5a94f52ffcbf3119d272a9369021a213ea6dad2.tar.zst yuzu-a5a94f52ffcbf3119d272a9369021a213ea6dad2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 2 | ||||
-rw-r--r-- | src/video_core/vulkan_common/vulkan_wrapper.cpp | 2 | ||||
-rw-r--r-- | src/video_core/vulkan_common/vulkan_wrapper.h | 15 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index c4d31681a..477fc428b 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -350,7 +350,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR .sampleRateShading = true, .dualSrcBlend = true, .logicOp = true, - .multiDrawIndirect = false, + .multiDrawIndirect = true, .drawIndirectFirstInstance = false, .depthClamp = true, .depthBiasClamp = true, diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index 7dca7341c..c58c4c1c4 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -94,6 +94,8 @@ void Load(VkDevice device, DeviceDispatch& dld) noexcept { X(vkCmdDispatch); X(vkCmdDraw); X(vkCmdDrawIndexed); + X(vkCmdDrawIndirectCount); + X(vkCmdDrawIndexedIndirectCount); X(vkCmdEndQuery); X(vkCmdEndRenderPass); X(vkCmdEndTransformFeedbackEXT); diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index 8bd4fd4d9..9bd158dce 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h @@ -213,6 +213,8 @@ struct DeviceDispatch : InstanceDispatch { PFN_vkCmdDispatch vkCmdDispatch{}; PFN_vkCmdDraw vkCmdDraw{}; PFN_vkCmdDrawIndexed vkCmdDrawIndexed{}; + PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount{}; + PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount{}; PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT{}; PFN_vkCmdEndQuery vkCmdEndQuery{}; PFN_vkCmdEndRenderPass vkCmdEndRenderPass{}; @@ -1019,6 +1021,19 @@ public: first_instance); } + void DrawIndirectCount(VkBuffer src_buffer, VkDeviceSize src_offset, VkBuffer count_buffer, + VkDeviceSize count_offset, u32 draw_count, u32 stride) const noexcept { + dld->vkCmdDrawIndirectCount(handle, src_buffer, src_offset, count_buffer, count_offset, + draw_count, stride); + } + + void DrawIndexedIndirectCount(VkBuffer src_buffer, VkDeviceSize src_offset, + VkBuffer count_buffer, VkDeviceSize count_offset, u32 draw_count, + u32 stride) const noexcept { + dld->vkCmdDrawIndexedIndirectCount(handle, src_buffer, src_offset, count_buffer, + count_offset, draw_count, stride); + } + void ClearAttachments(Span<VkClearAttachment> attachments, Span<VkClearRect> rects) const noexcept { dld->vkCmdClearAttachments(handle, attachments.size(), attachments.data(), rects.size(), |