diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-08-27 02:58:00 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-08-27 04:26:22 +0200 |
commit | 115792158d3ac4ca746d1775f2381e8f8dd18582 (patch) | |
tree | fec8995dd2a887068625e9d1278d0562bee6a8cb /src/video_core/renderer_opengl | |
parent | Shader Recompiler: Auto stub special registers and dump pipelines on exception. (diff) | |
download | yuzu-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_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 1ba31be88..dd03efecd 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -380,6 +380,17 @@ void RasterizerOpenGL::DispatchCompute() { pipeline->SetEngine(kepler_compute, gpu_memory); pipeline->Configure(); 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); + glBindBuffer(GL_DISPATCH_INDIRECT_BUFFER, buffer->Handle()); + glDispatchComputeIndirect(static_cast<GLintptr>(offset)); + return; + } glDispatchCompute(qmd.grid_dim_x, qmd.grid_dim_y, qmd.grid_dim_z); ++num_queued_commands; has_written_global_memory |= pipeline->WritesGlobalMemory(); |