From 6ac97405df021d5d2bd9a529253bd5c5a418c1a9 Mon Sep 17 00:00:00 2001 From: ameerj Date: Tue, 28 Jul 2020 00:08:02 -0400 Subject: Vk Async pipeline compilation --- src/video_core/renderer_vulkan/vk_pipeline_cache.h | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src/video_core/renderer_vulkan/vk_pipeline_cache.h') diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.h b/src/video_core/renderer_vulkan/vk_pipeline_cache.h index 0a3fe65fb..c70da6da4 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h @@ -22,6 +22,7 @@ #include "video_core/renderer_vulkan/vk_renderpass_cache.h" #include "video_core/renderer_vulkan/vk_shader_decompiler.h" #include "video_core/renderer_vulkan/wrapper.h" +#include "video_core/shader/async_shaders.h" #include "video_core/shader/memory_util.h" #include "video_core/shader/registry.h" #include "video_core/shader/shader_ir.h" @@ -152,16 +153,37 @@ public: std::array GetShaders(); - VKGraphicsPipeline& GetGraphicsPipeline(const GraphicsPipelineCacheKey& key); + VKGraphicsPipeline& GetGraphicsPipeline(const GraphicsPipelineCacheKey& key, + VideoCommon::Shader::AsyncShaders& async_shaders); VKComputePipeline& GetComputePipeline(const ComputePipelineCacheKey& key); + const VKDevice& GetDevice() { + return device; + } + + VKScheduler& GetScheduler() { + return scheduler; + } + + VKDescriptorPool& GetDescriptorPool() { + return descriptor_pool; + } + + VKUpdateDescriptorQueue& GetUpdateDescriptorQueue() { + return update_descriptor_queue; + } + + VKRenderPassCache& GetRenderpassCache() { + return renderpass_cache; + } + protected: void OnShaderRemoval(Shader* shader) final; private: std::pair> DecompileShaders( - const GraphicsPipelineCacheKey& key); + const FixedPipelineState& fixed_state); Core::System& system; const VKDevice& device; @@ -177,6 +199,7 @@ private: GraphicsPipelineCacheKey last_graphics_key; VKGraphicsPipeline* last_graphics_pipeline = nullptr; + std::vector> duplicates; std::unordered_map> graphics_cache; -- cgit v1.2.3