Files
LibretroAdmin 8f1331adab Hash in C89
The texture hash, the CRC32 helpers, Adler-32 and the Ector hash are C;
the texture hash picks CRC32 or MurmurHash3 once with a branch instead
of calling through a function pointer each time, CPUDetect still
deciding which. The hashes are bit for bit the old ones, so cached and
saved hashes stay valid.
2026-11-09 21:34:27 +01:00

18 lines
469 B
C++

// Copyright 2022 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "VideoCommon/GraphicsModSystem/Runtime/FBInfo.h"
#include "Common/Hash.h"
u32 FBInfo::CalculateHash() const
{
return common_hash_adler32(reinterpret_cast<const u8*>(this), sizeof(FBInfo));
}
bool FBInfo::operator==(const FBInfo& other) const
{
return m_height == other.m_height && m_width == other.m_width &&
m_texture_format == other.m_texture_format;
}