| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include "Common/CommonTypes.h" |
| 7 |
#include "Common/MathUtil.h" |
| 8 |
#include "VideoCommon/EFBInterface.h" |
| 9 |
#include "VideoCommon/PerfQueryBase.h" |
| 10 |
|
| 11 |
namespace EfbInterface |
| 12 |
{ |
| 13 |
|
| 14 |
#pragma pack(push, 1) |
| 15 |
struct yuv422_packed |
| 16 |
{ |
| 17 |
u8 Y; |
| 18 |
u8 UV; |
| 19 |
}; |
| 20 |
#pragma pack(pop) |
| 21 |
|
| 22 |
|
| 23 |
struct yuv444 |
| 24 |
{ |
| 25 |
u8 Y; |
| 26 |
s8 U; |
| 27 |
s8 V; |
| 28 |
}; |
| 29 |
|
| 30 |
enum |
| 31 |
{ |
| 32 |
ALP_C, |
| 33 |
BLU_C, |
| 34 |
GRN_C, |
| 35 |
RED_C |
| 36 |
}; |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
void BlendTev(u16 x, u16 y, u8* color); |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
bool ZCompare(u16 x, u16 y, u32 z); |
| 47 |
|
| 48 |
|
| 49 |
void SetColor(u16 x, u16 y, u8* color); |
| 50 |
void SetDepth(u16 x, u16 y, u32 depth); |
| 51 |
|
| 52 |
u8* GetPixelPointer(u16 x, u16 y, bool depth); |
| 53 |
|
| 54 |
void EncodeXFB(u8* xfb_in_ram, u32 memory_stride, const MathUtil::Rectangle<int>& source_rect, |
| 55 |
float y_scale, float gamma); |
| 56 |
|
| 57 |
u32 GetPerfQueryResult(PerfQueryType type); |
| 58 |
void ResetPerfQuery(); |
| 59 |
void IncPerfCounterQuadCount(PerfQueryType type); |
| 60 |
} |
| 61 |
|
| 62 |
namespace SW |
| 63 |
{ |
| 64 |
class SWEFBInterface final : public EFBInterfaceBase |
| 65 |
{ |
| 66 |
void ReinterpretPixelData(EFBReinterpretType convtype) override; |
| 67 |
|
| 68 |
void PokeColor(u16 x, u16 y, u32 color) override; |
| 69 |
void PokeDepth(u16 x, u16 y, u32 depth) override; |
| 70 |
|
| 71 |
u32 PeekColorInternal(u16 x, u16 y) override; |
| 72 |
u32 PeekDepthInternal(u16 x, u16 y) override; |
| 73 |
}; |
| 74 |
} |