mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 05:38:50 +00:00
VideoCommon: Better driver bug handling
Adds a pass to process driver deficiencies between UID caching and use, allowing a full view of the whole pipeline, since some bugs/workarounds involve interactions between blend modes and the pixel shader
This commit is contained in:
parent
99eef44765
commit
6ab24e6c17
16 changed files with 292 additions and 202 deletions
|
@ -2336,6 +2336,16 @@ struct BPCmd
|
|||
int newvalue;
|
||||
};
|
||||
|
||||
enum class EmulatedZ : u32
|
||||
{
|
||||
Disabled = 0,
|
||||
Early = 1,
|
||||
Late = 2,
|
||||
ForcedEarly = 3,
|
||||
EarlyWithFBFetch = 4,
|
||||
EarlyWithZComplocHack = 5,
|
||||
};
|
||||
|
||||
struct BPMemory
|
||||
{
|
||||
GenMode genMode;
|
||||
|
@ -2403,8 +2413,15 @@ struct BPMemory
|
|||
u32 bpMask; // 0xFE
|
||||
u32 unknown18; // ff
|
||||
|
||||
bool UseEarlyDepthTest() const { return zcontrol.early_ztest && zmode.testenable; }
|
||||
bool UseLateDepthTest() const { return !zcontrol.early_ztest && zmode.testenable; }
|
||||
EmulatedZ GetEmulatedZ() const
|
||||
{
|
||||
if (!zmode.testenable)
|
||||
return EmulatedZ::Disabled;
|
||||
if (zcontrol.early_ztest)
|
||||
return EmulatedZ::Early;
|
||||
else
|
||||
return EmulatedZ::Late;
|
||||
}
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue