Video_Software: Fix stuff.

This commit is contained in:
NeoBrainX 2012-08-27 23:51:35 +02:00
parent d734a5b486
commit 49d1da5e7e
5 changed files with 36 additions and 18 deletions

View File

@ -92,12 +92,18 @@ void SWBPWritten(int address, int newvalue)
break; break;
case BPMEM_CLEAR_PIXEL_PERF: case BPMEM_CLEAR_PIXEL_PERF:
// TODO: Parameter? // TODO: Parameter?
SWPixelEngine::pereg.perfZcompInputZcomploc = 0; SWPixelEngine::pereg.perfZcompInputZcomplocLo = 0;
SWPixelEngine::pereg.perfZcompOutputZcomploc = 0; SWPixelEngine::pereg.perfZcompInputZcomplocHi = 0;
SWPixelEngine::pereg.perfZcompInput = 0; SWPixelEngine::pereg.perfZcompOutputZcomplocLo = 0;
SWPixelEngine::pereg.perfZcompOutput = 0; SWPixelEngine::pereg.perfZcompOutputZcomplocHi = 0;
SWPixelEngine::pereg.perfBlendInput = 0; SWPixelEngine::pereg.perfZcompInputLo = 0;
SWPixelEngine::pereg.perfEfbCopyClocks = 0; SWPixelEngine::pereg.perfZcompInputHi = 0;
SWPixelEngine::pereg.perfZcompOutputLo = 0;
SWPixelEngine::pereg.perfZcompOutputHi = 0;
SWPixelEngine::pereg.perfBlendInputLo = 0;
SWPixelEngine::pereg.perfBlendInputHi = 0;
SWPixelEngine::pereg.perfEfbCopyClocksLo = 0;
SWPixelEngine::pereg.perfEfbCopyClocksHi = 0;
break; break;
case BPMEM_LOADTLUT0: // This one updates bpmem.tlutXferSrc, no need to do anything here. case BPMEM_LOADTLUT0: // This one updates bpmem.tlutXferSrc, no need to do anything here.
break; break;

View File

@ -129,14 +129,17 @@ inline void Draw(s32 x, s32 y, s32 xi, s32 yi)
if (bpmem.zcontrol.zcomploc) if (bpmem.zcontrol.zcomploc)
{ {
// TODO: Verify that perf regs are being incremented even if test is disabled // TODO: Verify that perf regs are being incremented even if test is disabled
SWPixelEngine::pereg.perfZcompInputZcomploc++; if (++SWPixelEngine::pereg.perfZcompInputZcomplocLo == 0)
SWPixelEngine::pereg.perfZcompInputZcomplocHi++;
if (bpmem.zmode.testenable) if (bpmem.zmode.testenable)
{ {
// early z // early z
if (!EfbInterface::ZCompare(x, y, z)) if (!EfbInterface::ZCompare(x, y, z))
return; return;
} }
SWPixelEngine::pereg.perfZcompOutputZcomploc++; if (++SWPixelEngine::pereg.perfZcompOutputZcomplocLo == 0)
SWPixelEngine::pereg.perfZcompOutputZcomplocHi++;
} }
RasterBlockPixel& pixel = rasterBlock.Pixel[xi][yi]; RasterBlockPixel& pixel = rasterBlock.Pixel[xi][yi];

View File

@ -82,7 +82,7 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
if (address > 0x16) if (address > 0x16)
{ {
ERROR_LOG(PIXELENGINE, "addr %#08x, ret %#08x; %#08x, %#08x, %#08x, %#08x, %#08x, %#08x\n", address, _uReturnValue, pereg.perfZcompInputZcomploc, pereg.perfZcompOutputZcomploc, pereg.perfZcompInput, pereg.perfZcompOutput, pereg.perfBlendInput, pereg.perfEfbCopyClocks); ERROR_LOG(PIXELENGINE, "addr %#08x, ret %#08x\n", address, _uReturnValue);
} }
} }

View File

@ -146,12 +146,18 @@ namespace SWPixelEngine
u16 boxTop; u16 boxTop;
u16 boxBottom; u16 boxBottom;
u16 perfZcompInputZcomploc; u16 perfZcompInputZcomplocLo;
u16 perfZcompOutputZcomploc; u16 perfZcompInputZcomplocHi;
u16 perfZcompInput; u16 perfZcompOutputZcomplocLo;
u16 perfZcompOutput; u16 perfZcompOutputZcomplocHi;
u16 perfBlendInput; u16 perfZcompInputLo;
u16 perfEfbCopyClocks; u16 perfZcompInputHi;
u16 perfZcompOutputLo;
u16 perfZcompOutputHi;
u16 perfBlendInputLo;
u16 perfBlendInputHi;
u16 perfEfbCopyClocksLo;
u16 perfEfbCopyClocksHi;
}; };
extern PEReg pereg; extern PEReg pereg;

View File

@ -787,13 +787,15 @@ void Tev::Draw()
if (!bpmem.zcontrol.zcomploc) if (!bpmem.zcontrol.zcomploc)
{ {
SWPixelEngine::pereg.perfZcompInput++; if (++SWPixelEngine::pereg.perfZcompInputLo == 0)
SWPixelEngine::pereg.perfZcompInputHi++;
if (bpmem.zmode.testenable) if (bpmem.zmode.testenable)
{ {
if (!EfbInterface::ZCompare(Position[0], Position[1], Position[2])) if (!EfbInterface::ZCompare(Position[0], Position[1], Position[2]))
return; return;
} }
SWPixelEngine::pereg.perfZcompOutput++; if (++SWPixelEngine::pereg.perfZcompOutputLo == 0)
SWPixelEngine::pereg.perfZcompOutputHi++;
} }
#if ALLOW_TEV_DUMPS #if ALLOW_TEV_DUMPS
@ -818,7 +820,8 @@ void Tev::Draw()
INCSTAT(swstats.thisFrame.tevPixelsOut); INCSTAT(swstats.thisFrame.tevPixelsOut);
SWPixelEngine::pereg.perfBlendInput++; if (++SWPixelEngine::pereg.perfBlendInputLo)
SWPixelEngine::pereg.perfBlendInputHi++;
EfbInterface::BlendTev(Position[0], Position[1], output); EfbInterface::BlendTev(Position[0], Position[1], output);
} }