summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_pipeline_cache.h
diff options
context:
space:
mode:
authorAmeer <aj662@drexel.edu>2020-07-09 03:15:49 +0200
committerAmeer <aj662@drexel.edu>2020-07-09 03:15:49 +0200
commit4489ea6f532a501ca4cc379d8d8fb50ce1af27d7 (patch)
tree52f62331d39f338f6ae6d0fd56831bdd577943a9 /src/video_core/renderer_vulkan/vk_pipeline_cache.h
parentAddress PR feedback, fix axis button thresholding (diff)
parentMerge pull request #4266 from jbeich/freebsd (diff)
downloadyuzu-4489ea6f532a501ca4cc379d8d8fb50ce1af27d7.tar
yuzu-4489ea6f532a501ca4cc379d8d8fb50ce1af27d7.tar.gz
yuzu-4489ea6f532a501ca4cc379d8d8fb50ce1af27d7.tar.bz2
yuzu-4489ea6f532a501ca4cc379d8d8fb50ce1af27d7.tar.lz
yuzu-4489ea6f532a501ca4cc379d8d8fb50ce1af27d7.tar.xz
yuzu-4489ea6f532a501ca4cc379d8d8fb50ce1af27d7.tar.zst
yuzu-4489ea6f532a501ca4cc379d8d8fb50ce1af27d7.zip
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_pipeline_cache.h')
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.h8
1 files changed, 6 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 0a36e5112..0a3fe65fb 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h
@@ -44,10 +44,10 @@ class VKUpdateDescriptorQueue;
using Maxwell = Tegra::Engines::Maxwell3D::Regs;
struct GraphicsPipelineCacheKey {
- FixedPipelineState fixed_state;
RenderPassParams renderpass_params;
+ u32 padding;
std::array<GPUVAddr, Maxwell::MaxShaderProgram> shaders;
- u64 padding; // This is necessary for unique object representations
+ FixedPipelineState fixed_state;
std::size_t Hash() const noexcept;
@@ -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>);