mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 18:01:56 +00:00
VideoSoftware: Cleanup PE perf metrics; returning the proper value now.
This commit is contained in:
parent
7682ed22c6
commit
d0dbcc6369
5 changed files with 57 additions and 27 deletions
|
@ -158,6 +158,54 @@ namespace SWPixelEngine
|
|||
u16 perfBlendInputHi;
|
||||
u16 perfEfbCopyClocksLo;
|
||||
u16 perfEfbCopyClocksHi;
|
||||
|
||||
// NOTE: hardware doesn't process individual pixels but quads instead. Current software renderer architecture works on pixels though, so we have this "quad" hack here to only increment the registers on every fourth rendered pixel
|
||||
void IncZInputQuadCount(bool early_ztest)
|
||||
{
|
||||
static int quad = 0;
|
||||
if (++quad != 3)
|
||||
return;
|
||||
quad = 0;
|
||||
|
||||
if (early_ztest)
|
||||
{
|
||||
if (++perfZcompInputZcomplocLo == 0)
|
||||
perfZcompInputZcomplocHi++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (++perfZcompInputLo == 0)
|
||||
perfZcompInputHi++;
|
||||
}
|
||||
}
|
||||
void IncZOutputQuadCount(bool early_ztest)
|
||||
{
|
||||
static int quad = 0;
|
||||
if (++quad != 3)
|
||||
return;
|
||||
quad = 0;
|
||||
|
||||
if (early_ztest)
|
||||
{
|
||||
if (++perfZcompOutputZcomplocLo == 0)
|
||||
perfZcompOutputZcomplocHi++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (++perfZcompOutputLo == 0)
|
||||
perfZcompOutputHi++;
|
||||
}
|
||||
}
|
||||
void IncBlendInputQuadCount()
|
||||
{
|
||||
static int quad = 0;
|
||||
if (++quad != 3)
|
||||
return;
|
||||
quad = 0;
|
||||
|
||||
if (++perfBlendInputLo == 0)
|
||||
perfBlendInputHi++;
|
||||
}
|
||||
};
|
||||
|
||||
extern PEReg pereg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue