diff --git a/dep/vulkan-loader/src/vulkan_loader.cpp b/dep/vulkan-loader/src/vulkan_loader.cpp index 37ce1dc34..7d6ccb722 100644 --- a/dep/vulkan-loader/src/vulkan_loader.cpp +++ b/dep/vulkan-loader/src/vulkan_loader.cpp @@ -111,12 +111,7 @@ bool LoadVulkanLibrary() if (libvulkan_env) vulkan_module = dlopen(libvulkan_env, RTLD_NOW); if (!vulkan_module) - { - // Use the libvulkan.dylib from the application bundle. - std::string executable_path = FileSystem::GetProgramPath(); - std::string path = FileSystem::GetPathDirectory(executable_path.c_str()) + "/libvulkan.dylib"; - vulkan_module = dlopen(path.c_str(), RTLD_NOW); - } + vulkan_module = dlopen("libvulkan.dylib", RTLD_NOW); #else // Names of libraries to search. Desktop should use libvulkan.so.1 or libvulkan.so. static const char* search_lib_names[] = {"libvulkan.so.1", "libvulkan.so"}; diff --git a/src/common/vulkan/shader_cache.cpp b/src/common/vulkan/shader_cache.cpp index bc69bcd72..f63542815 100644 --- a/src/common/vulkan/shader_cache.cpp +++ b/src/common/vulkan/shader_cache.cpp @@ -400,7 +400,7 @@ std::string ShaderCache::GetPipelineCacheBaseFileName(const std::string_view& ba ShaderCache::CacheIndexKey ShaderCache::GetCacheKey(ShaderCompiler::Type type, const std::string_view& shader_code) { - union + union HashParts { struct { @@ -409,12 +409,13 @@ ShaderCache::CacheIndexKey ShaderCache::GetCacheKey(ShaderCompiler::Type type, c }; u8 hash[16]; }; + HashParts h; MD5Digest digest; digest.Update(shader_code.data(), static_cast(shader_code.length())); - digest.Final(hash); + digest.Final(h.hash); - return CacheIndexKey{hash_low, hash_high, static_cast(shader_code.length()), type}; + return CacheIndexKey{h.hash_low, h.hash_high, static_cast(shader_code.length()), type}; } std::optional ShaderCache::GetShaderSPV(ShaderCompiler::Type type, diff --git a/src/common/vulkan/shader_cache.h b/src/common/vulkan/shader_cache.h index 34db8a12a..2029e49b7 100644 --- a/src/common/vulkan/shader_cache.h +++ b/src/common/vulkan/shader_cache.h @@ -4,6 +4,7 @@ #include "shader_compiler.h" #include "vulkan_loader.h" #include +#include #include #include #include