summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.h
blob: d4ab5b3d1c87485f3f9efd4c27c574b3130e1b21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2022 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "Common/CommonTypes.h"
#include "VideoCommon/TextureDecoder.h"

struct FBInfo
{
  u32 m_height = 0;
  u32 m_width = 0;
  TextureFormat m_texture_format = TextureFormat::I4;
  u32 CalculateHash() const;
  bool operator==(const FBInfo& other) const;
};

struct FBInfoHasher
{
  std::size_t operator()(const FBInfo& fb_info) const noexcept
  {
    return static_cast<std::size_t>(fb_info.CalculateHash());
  }
};