diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-06-06 05:11:36 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:35 +0200 |
commit | cffd4716c5ebf9b93505b5bfa96d9b407f349336 (patch) | |
tree | e94c3daa5420fc066695b1082b0f0af60c5cb555 /src/video_core/renderer_vulkan/vk_compute_pipeline.cpp | |
parent | vk_pipeline_cache: Add asynchronous shaders (diff) | |
download | yuzu-cffd4716c5ebf9b93505b5bfa96d9b407f349336.tar yuzu-cffd4716c5ebf9b93505b5bfa96d9b407f349336.tar.gz yuzu-cffd4716c5ebf9b93505b5bfa96d9b407f349336.tar.bz2 yuzu-cffd4716c5ebf9b93505b5bfa96d9b407f349336.tar.lz yuzu-cffd4716c5ebf9b93505b5bfa96d9b407f349336.tar.xz yuzu-cffd4716c5ebf9b93505b5bfa96d9b407f349336.tar.zst yuzu-cffd4716c5ebf9b93505b5bfa96d9b407f349336.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_compute_pipeline.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_compute_pipeline.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp index ca59042ff..cc855a62e 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp @@ -14,6 +14,7 @@ #include "video_core/renderer_vulkan/vk_pipeline_cache.h" #include "video_core/renderer_vulkan/vk_scheduler.h" #include "video_core/renderer_vulkan/vk_update_descriptor.h" +#include "video_core/shader_notify.h" #include "video_core/vulkan_common/vulkan_device.h" #include "video_core/vulkan_common/vulkan_wrapper.h" @@ -24,14 +25,18 @@ using Tegra::Texture::TexturePair; ComputePipeline::ComputePipeline(const Device& device_, DescriptorPool& descriptor_pool, VKUpdateDescriptorQueue& update_descriptor_queue_, - Common::ThreadWorker* thread_worker, const Shader::Info& info_, + Common::ThreadWorker* thread_worker, + VideoCore::ShaderNotify* shader_notify, const Shader::Info& info_, vk::ShaderModule spv_module_) : device{device_}, update_descriptor_queue{update_descriptor_queue_}, info{info_}, spv_module(std::move(spv_module_)) { + if (shader_notify) { + shader_notify->MarkShaderBuilding(); + } std::copy_n(info.constant_buffer_used_sizes.begin(), uniform_buffer_sizes.size(), uniform_buffer_sizes.begin()); - auto func{[this, &descriptor_pool] { + auto func{[this, &descriptor_pool, shader_notify] { DescriptorLayoutBuilder builder{device.GetLogical()}; builder.Add(info, VK_SHADER_STAGE_COMPUTE_BIT); @@ -66,6 +71,9 @@ ComputePipeline::ComputePipeline(const Device& device_, DescriptorPool& descript std::lock_guard lock{build_mutex}; is_built = true; build_condvar.notify_one(); + if (shader_notify) { + shader_notify->MarkShaderComplete(); + } }}; if (thread_worker) { thread_worker->QueueWork(std::move(func)); |