Debian Codegraph @

Source/Core/VideoCommon/EFBInterface.h

raw symbols SCIP
1 // Copyright 2025 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <memory>
7
8 #include "Common/CommonTypes.h"
9
10 enum class EFBReinterpretType;
11
12 class EFBInterfaceBase
13 {
14 public:
15 virtual ~EFBInterfaceBase();
16
17 virtual void ReinterpretPixelData(EFBReinterpretType convtype) = 0;
18
19 virtual void PokeColor(u16 x, u16 y, u32 color) = 0;
20 virtual void PokeDepth(u16 x, u16 y, u32 depth) = 0;
21
22 u32 PeekColor(u16 x, u16 y);
23 u32 PeekDepth(u16 x, u16 y);
24
25 protected:
26 bool ShouldSkipAccess(u16 x, u16 y) const;
27
28 virtual u32 PeekColorInternal(u16 x, u16 y) = 0;
29 virtual u32 PeekDepthInternal(u16 x, u16 y) = 0;
30 };
31
32 class HardwareEFBInterface final : public EFBInterfaceBase
33 {
34 void ReinterpretPixelData(EFBReinterpretType convtype) override;
35
36 void PokeColor(u16 x, u16 y, u32 color) override;
37 void PokeDepth(u16 x, u16 y, u32 depth) override;
38
39 u32 PeekColorInternal(u16 x, u16 y) override;
40 u32 PeekDepthInternal(u16 x, u16 y) override;
41 };
42
43 extern std::unique_ptr<EFBInterfaceBase> g_efb_interface;