summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2023-08-27 02:58:00 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-08-27 04:26:22 +0200
commit115792158d3ac4ca746d1775f2381e8f8dd18582 (patch)
treefec8995dd2a887068625e9d1278d0562bee6a8cb /src/video_core/renderer_vulkan
parentShader Recompiler: Auto stub special registers and dump pipelines on exception. (diff)
downloadyuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar
yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.gz
yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.bz2
yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.lz
yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.xz
yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.zst
yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index 032f694bc..01e76a82c 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -463,6 +463,20 @@ void RasterizerVulkan::DispatchCompute() {
pipeline->Configure(*kepler_compute, *gpu_memory, scheduler, buffer_cache, texture_cache);
const auto& qmd{kepler_compute->launch_description};
+ auto indirect_address = kepler_compute->GetIndirectComputeAddress();
+ if (indirect_address) {
+ // DispatchIndirect
+ static constexpr auto sync_info = VideoCommon::ObtainBufferSynchronize::FullSynchronize;
+ const auto post_op = VideoCommon::ObtainBufferOperation::DiscardWrite;
+ const auto [buffer, offset] =
+ buffer_cache.ObtainBuffer(*indirect_address, 12, sync_info, post_op);
+ scheduler.RequestOutsideRenderPassOperationContext();
+ scheduler.Record([indirect_buffer = buffer->Handle(),
+ indirect_offset = offset](vk::CommandBuffer cmdbuf) {
+ cmdbuf.DispatchIndirect(indirect_buffer, indirect_offset);
+ });
+ return;
+ }
const std::array<u32, 3> dim{qmd.grid_dim_x, qmd.grid_dim_y, qmd.grid_dim_z};
scheduler.RequestOutsideRenderPassOperationContext();
scheduler.Record([dim](vk::CommandBuffer cmdbuf) { cmdbuf.Dispatch(dim[0], dim[1], dim[2]); });