diff options
author | ameerj <aj662@drexel.edu> | 2020-07-28 06:08:02 +0200 |
---|---|---|
committer | ameerj <aj662@drexel.edu> | 2020-08-16 18:02:22 +0200 |
commit | 6ac97405df021d5d2bd9a529253bd5c5a418c1a9 (patch) | |
tree | 0abc29657e9187bcfd3484ed7b091d0ea0f89f0f /src/video_core/renderer_vulkan/vk_pipeline_cache.h | |
parent | Merge pull request #4528 from lioncash/discard (diff) | |
download | yuzu-6ac97405df021d5d2bd9a529253bd5c5a418c1a9.tar yuzu-6ac97405df021d5d2bd9a529253bd5c5a418c1a9.tar.gz yuzu-6ac97405df021d5d2bd9a529253bd5c5a418c1a9.tar.bz2 yuzu-6ac97405df021d5d2bd9a529253bd5c5a418c1a9.tar.lz yuzu-6ac97405df021d5d2bd9a529253bd5c5a418c1a9.tar.xz yuzu-6ac97405df021d5d2bd9a529253bd5c5a418c1a9.tar.zst yuzu-6ac97405df021d5d2bd9a529253bd5c5a418c1a9.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_pipeline_cache.h')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.h | 27 |
1 files changed, 25 insertions, 2 deletions
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<Shader*, Maxwell::MaxShaderProgram> 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<SPIRVProgram, std::vector<VkDescriptorSetLayoutBinding>> 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<std::unique_ptr<VKGraphicsPipeline>> duplicates; std::unordered_map<GraphicsPipelineCacheKey, std::unique_ptr<VKGraphicsPipeline>> graphics_cache; |