mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
D3D11: Implement some PE pixel performance metrics.
Super Mario Sunshine is using a cool trick: To determine how much goop has been cleaned in ep. 6 of Sirena Beach, it counts the number of pixels that are input to the blending stage. For that it's using the PE performance registers ;) Fixes issue 1498.
This commit is contained in:
@ -62,7 +62,6 @@ void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, float yScale, float xf
|
||||
{
|
||||
Renderer::RenderToXFB(xfbAddr, dstWidth, dstHeight, rc, gamma);
|
||||
}
|
||||
|
||||
void BPWritten(const BPCmd& bp)
|
||||
{
|
||||
/*
|
||||
@ -141,7 +140,8 @@ void BPWritten(const BPCmd& bp)
|
||||
|| bp.address == BPMEM_LOADTLUT0
|
||||
|| bp.address == BPMEM_LOADTLUT1
|
||||
|| bp.address == BPMEM_TEXINVALIDATE
|
||||
|| bp.address == BPMEM_PRELOAD_MODE))
|
||||
|| bp.address == BPMEM_PRELOAD_MODE
|
||||
|| bp.address == BPMEM_CLEAR_PIXEL_PERF))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -265,6 +265,8 @@ void BPWritten(const BPCmd& bp)
|
||||
|
||||
UPE_Copy PE_copy = bpmem.triggerEFBCopy;
|
||||
|
||||
g_renderer->ResumePixelPerf(true);
|
||||
|
||||
// Check if we are to copy from the EFB or draw to the XFB
|
||||
if (PE_copy.copy_to_xfb == 0)
|
||||
{
|
||||
@ -303,6 +305,8 @@ void BPWritten(const BPCmd& bp)
|
||||
s_gammaLUT[PE_copy.gamma]);
|
||||
}
|
||||
|
||||
g_renderer->PausePixelPerf(true);
|
||||
|
||||
// Clear the rectangular region after copying it.
|
||||
if (PE_copy.clear)
|
||||
{
|
||||
@ -481,8 +485,9 @@ void BPWritten(const BPCmd& bp)
|
||||
case BPMEM_REVBITS: // Always set to 0x0F when GX_InitRevBits() is called.
|
||||
break;
|
||||
|
||||
case BPMEM_UNKNOWN_57: // Sunshine alternates this register between values 0x000 and 0xAAA
|
||||
DEBUG_LOG(VIDEO, "Unknown BP Reg 0x57: %08x", bp.newvalue);
|
||||
case BPMEM_CLEAR_PIXEL_PERF:
|
||||
// GXClearPixMetric writes 0xAAA here, Sunshine alternates this register between values 0x000 and 0xAAA
|
||||
g_renderer->ResetPixelPerf();
|
||||
break;
|
||||
|
||||
case BPMEM_PRELOAD_ADDR:
|
||||
|
Reference in New Issue
Block a user