mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-16 12:09:07 +00:00
Fix for memory leak
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
This commit is contained in:
parent
abf9b23277
commit
6fe107a0e3
@ -517,7 +517,11 @@ u64 Shader::Gcn::FetchShaderData::Hash() const {
|
||||
for (const auto& attrib : attributes) {
|
||||
XXH64_update(state, &attrib, sizeof(attrib));
|
||||
}
|
||||
return XXH64_digest(state);
|
||||
|
||||
const u64 hash = XXH64_digest(state);
|
||||
XXH64_freeState(state);
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
u64 StageSpecialization::Hash() const {
|
||||
@ -544,6 +548,7 @@ u64 StageSpecialization::Hash() const {
|
||||
}
|
||||
|
||||
u64 hash = XXH64_digest(state);
|
||||
XXH64_freeState(state);
|
||||
|
||||
if (fetch_shader_data) {
|
||||
hash = HashCombine(hash, fetch_shader_data->Hash());
|
||||
|
||||
@ -155,7 +155,6 @@ bool DataBase::Save(BlobType type, const std::string& name, std::vector<u32>&& d
|
||||
|
||||
auto path = cache_dir / name;
|
||||
return WriteVector(type, std::move(path), std::move(data));
|
||||
return true;
|
||||
}
|
||||
|
||||
void DataBase::Load(BlobType type, const std::string& name, std::vector<u8>& data) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user