summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_pipeline_cache.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-06-23 00:07:04 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-06-27 01:57:22 +0200
commit8584a77eb2e51e702d4c941e0fca07aafc47f29b (patch)
tree0a6929b316f2d92dc04b898053a3da09401844c9 /src/video_core/renderer_vulkan/vk_pipeline_cache.h
parentvulkan/fixed_pipeline_state: Move state out of individual structures (diff)
downloadyuzu-8584a77eb2e51e702d4c941e0fca07aafc47f29b.tar
yuzu-8584a77eb2e51e702d4c941e0fca07aafc47f29b.tar.gz
yuzu-8584a77eb2e51e702d4c941e0fca07aafc47f29b.tar.bz2
yuzu-8584a77eb2e51e702d4c941e0fca07aafc47f29b.tar.lz
yuzu-8584a77eb2e51e702d4c941e0fca07aafc47f29b.tar.xz
yuzu-8584a77eb2e51e702d4c941e0fca07aafc47f29b.tar.zst
yuzu-8584a77eb2e51e702d4c941e0fca07aafc47f29b.zip
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_pipeline_cache.h')
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.h b/src/video_core/renderer_vulkan/vk_pipeline_cache.h
index 7f6c56261..0a3fe65fb 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h
@@ -56,6 +56,10 @@ struct GraphicsPipelineCacheKey {
bool operator!=(const GraphicsPipelineCacheKey& rhs) const noexcept {
return !operator==(rhs);
}
+
+ std::size_t Size() const noexcept {
+ return sizeof(renderpass_params) + sizeof(padding) + sizeof(shaders) + fixed_state.Size();
+ }
};
static_assert(std::has_unique_object_representations_v<GraphicsPipelineCacheKey>);
static_assert(std::is_trivially_copyable_v<GraphicsPipelineCacheKey>);