diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-24 23:27:25 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:29 +0200 |
commit | f4ace63957ee47c4e3e913954f07375d0391beae (patch) | |
tree | 43ed58cf34f507d7a5696ad7d5cd7d7df2e70940 /src/video_core/renderer_vulkan/vk_pipeline_cache.h | |
parent | shader: Fix BFE s32 undefined check (diff) | |
download | yuzu-f4ace63957ee47c4e3e913954f07375d0391beae.tar yuzu-f4ace63957ee47c4e3e913954f07375d0391beae.tar.gz yuzu-f4ace63957ee47c4e3e913954f07375d0391beae.tar.bz2 yuzu-f4ace63957ee47c4e3e913954f07375d0391beae.tar.lz yuzu-f4ace63957ee47c4e3e913954f07375d0391beae.tar.xz yuzu-f4ace63957ee47c4e3e913954f07375d0391beae.tar.zst yuzu-f4ace63957ee47c4e3e913954f07375d0391beae.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.h | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.h b/src/video_core/renderer_vulkan/vk_pipeline_cache.h index e12e4422f..ad569acc4 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h @@ -58,26 +58,6 @@ static_assert(std::has_unique_object_representations_v<ComputePipelineCacheKey>) static_assert(std::is_trivially_copyable_v<ComputePipelineCacheKey>); static_assert(std::is_trivially_constructible_v<ComputePipelineCacheKey>); -struct GraphicsPipelineCacheKey { - std::array<u128, 6> unique_hashes; - FixedPipelineState state; - - size_t Hash() const noexcept; - - bool operator==(const GraphicsPipelineCacheKey& rhs) const noexcept; - - bool operator!=(const GraphicsPipelineCacheKey& rhs) const noexcept { - return !operator==(rhs); - } - - size_t Size() const noexcept { - return sizeof(unique_hashes) + state.Size(); - } -}; -static_assert(std::has_unique_object_representations_v<GraphicsPipelineCacheKey>); -static_assert(std::is_trivially_copyable_v<GraphicsPipelineCacheKey>); -static_assert(std::is_trivially_constructible_v<GraphicsPipelineCacheKey>); - } // namespace Vulkan namespace std { @@ -89,13 +69,6 @@ struct hash<Vulkan::ComputePipelineCacheKey> { } }; -template <> -struct hash<Vulkan::GraphicsPipelineCacheKey> { - size_t operator()(const Vulkan::GraphicsPipelineCacheKey& k) const noexcept { - return k.Hash(); - } -}; - } // namespace std namespace Vulkan { @@ -181,7 +154,10 @@ private: TextureCache& texture_cache; GraphicsPipelineCacheKey graphics_key{}; + GraphicsPipeline* current_pipeline{}; + std::array<const ShaderInfo*, 6> shader_infos{}; + bool last_valid_shaders{}; std::unordered_map<ComputePipelineCacheKey, std::unique_ptr<ComputePipeline>> compute_cache; std::unordered_map<GraphicsPipelineCacheKey, std::unique_ptr<GraphicsPipeline>> graphics_cache; |