summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
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.cpp
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.cpp')
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index e684c17a6..3da835324 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -116,12 +116,12 @@ u32 FillDescriptorLayout(const ShaderEntries& entries,
} // Anonymous namespace
std::size_t GraphicsPipelineCacheKey::Hash() const noexcept {
- const u64 hash = Common::CityHash64(reinterpret_cast<const char*>(this), sizeof *this);
+ const u64 hash = Common::CityHash64(reinterpret_cast<const char*>(this), Size());
return static_cast<std::size_t>(hash);
}
bool GraphicsPipelineCacheKey::operator==(const GraphicsPipelineCacheKey& rhs) const noexcept {
- return std::memcmp(&rhs, this, sizeof *this) == 0;
+ return std::memcmp(&rhs, this, Size()) == 0;
}
std::size_t ComputePipelineCacheKey::Hash() const noexcept {
@@ -312,7 +312,8 @@ VKPipelineCache::DecompileShaders(const GraphicsPipelineCacheKey& key) {
const auto& gpu = system.GPU().Maxwell3D();
Specialization specialization;
- if (fixed_state.dynamic_state.Topology() == Maxwell::PrimitiveTopology::Points) {
+ if (fixed_state.dynamic_state.Topology() == Maxwell::PrimitiveTopology::Points ||
+ device.IsExtExtendedDynamicStateSupported()) {
float point_size;
std::memcpy(&point_size, &fixed_state.point_size, sizeof(float));
specialization.point_size = point_size;